TestWrapDoAPIError_SDKServerTimeout pins that a *larkcore.ServerTimeoutError (504 Gateway Timeout surfaced by the SDK as a typed error rather than an *http.Response) classifies as timeout — upstream took too long to respond.
(t *testing.T)
| 128 | // (504 Gateway Timeout surfaced by the SDK as a typed error rather than an |
| 129 | // *http.Response) classifies as timeout — upstream took too long to respond. |
| 130 | func TestWrapDoAPIError_SDKServerTimeout(t *testing.T) { |
| 131 | got := WrapDoAPIError(&larkcore.ServerTimeoutError{}) |
| 132 | var ne *errs.NetworkError |
| 133 | if !errors.As(got, &ne) { |
| 134 | t.Fatalf("expected *errs.NetworkError, got %T", got) |
| 135 | } |
| 136 | if ne.Subtype != errs.SubtypeNetworkTimeout { |
| 137 | t.Errorf("Subtype = %v, want %v", ne.Subtype, errs.SubtypeNetworkTimeout) |
| 138 | } |
| 139 | } |
| 140 | |
| 141 | // TestWrapDoAPIError_SDKClientTimeout pins that a *larkcore.ClientTimeoutError |
| 142 | // (client-side request timeout the SDK reports without satisfying net.Error) |
nothing calls this directly
no test coverage detected