TestWrapDoAPIError_DNS pins that a *net.DNSError classifies as NetworkError{Subtype: dns}.
(t *testing.T)
| 114 | // TestWrapDoAPIError_DNS pins that a *net.DNSError classifies as |
| 115 | // NetworkError{Subtype: dns}. |
| 116 | func TestWrapDoAPIError_DNS(t *testing.T) { |
| 117 | got := WrapDoAPIError(&net.DNSError{Name: "example.invalid"}) |
| 118 | var ne *errs.NetworkError |
| 119 | if !errors.As(got, &ne) { |
| 120 | t.Fatalf("expected *errs.NetworkError, got %T", got) |
| 121 | } |
| 122 | if ne.Subtype != errs.SubtypeNetworkDNS { |
| 123 | t.Errorf("Subtype = %v, want %v", ne.Subtype, errs.SubtypeNetworkDNS) |
| 124 | } |
| 125 | } |
| 126 | |
| 127 | // TestWrapDoAPIError_SDKServerTimeout pins that a *larkcore.ServerTimeoutError |
| 128 | // (504 Gateway Timeout surfaced by the SDK as a typed error rather than an |
nothing calls this directly
no test coverage detected