TestWrapDoAPIError_SDKClientTimeout pins that a *larkcore.ClientTimeoutError (client-side request timeout the SDK reports without satisfying net.Error) classifies as timeout.
(t *testing.T)
| 142 | // (client-side request timeout the SDK reports without satisfying net.Error) |
| 143 | // classifies as timeout. |
| 144 | func TestWrapDoAPIError_SDKClientTimeout(t *testing.T) { |
| 145 | got := WrapDoAPIError(&larkcore.ClientTimeoutError{}) |
| 146 | var ne *errs.NetworkError |
| 147 | if !errors.As(got, &ne) { |
| 148 | t.Fatalf("expected *errs.NetworkError, got %T", got) |
| 149 | } |
| 150 | if ne.Subtype != errs.SubtypeNetworkTimeout { |
| 151 | t.Errorf("Subtype = %v, want %v", ne.Subtype, errs.SubtypeNetworkTimeout) |
| 152 | } |
| 153 | } |
| 154 | |
| 155 | // TestWrapDoAPIError_UnknownCause_FallsBackToTransport pins the fallback: |
| 156 | // when none of the specific causes match, NetworkError uses the generic |
nothing calls this directly
no test coverage detected