MCPcopy
hub / github.com/nats-io/nats.go / Is

Method Is

jserrors.go:226–237  ·  jserrors.go::APIError.Is

Is matches against an APIError.

(err error)

Source from the content-addressed store, hash-verified

224
225// Is matches against an APIError.
226func (e *APIError) Is(err error) bool {
227 if e == nil {
228 return false
229 }
230 // Extract internal APIError to match against.
231 var aerr *APIError
232 ok := errors.As(err, &aerr)
233 if !ok {
234 return ok
235 }
236 return e.ErrorCode == aerr.ErrorCode
237}
238
239// JetStreamError is an error result that happens when using JetStream.
240// In case of client-side error, `APIError()` returns nil

Callers 15

PublishMsgMethod · 0.45
subscribeMethod · 0.45
resetOrderedConsumerMethod · 0.45
FetchMethod · 0.45
FetchBatchMethod · 0.45
checkCtxErrMethod · 0.45
KeyValueMethod · 0.45
CreateKeyValueMethod · 0.45
GetMethod · 0.45
GetRevisionMethod · 0.45
getMethod · 0.45

Calls

no outgoing calls