Documentation
¶
Index ¶
Constants ¶
View Source
const ( STAGE_BEFORE_REQUEST = "before-request" STAGE_REQUEST = "request" STAGE_AFTER_REQUEST = "after-request" TYPE_UNKNOWN = "unknown" TYPE_NOT_IMPLEMENTED = "not-implemented" TYPE_JSON_PARSE = "json" TYPE_REQUEST_PREP = "request-prep" TYPE_IO = "io" TYPE_HTTP_STATUS = "not-ok-http-status" TYPE_INVALID_DATA = "invalid-data" ITERABLE_NoUserWithIdExists = "error.users.noUserWithIdExists" ITERABLE_InvalidList = "error.lists.invalidListId" ITERABLE_Success = "Success" ITERABLE_FieldTypeMismatchErrStr = "RequestFieldsTypesMismatched" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiError ¶
type ApiError struct {
Stage string
Type string
SourceErr error
Body []byte
HttpStatusCode int
IterableCode string
}
func (*ApiError) Is ¶ added in v0.2.0
Is method is required by errors.Is() to properly distinguish between different types -vs- same pointer to the same type. Without it, errors.Is(err, ErrFieldTypeMismatch) returns false: ok := errors.Is(errors.Join(&iterable_errors.ApiError{}), &iterable_errors.ApiError{}) ^ would be false
Click to show internal directories.
Click to hide internal directories.