package
1.1.3
Repository: https://github.com/monadicstack/frodo.git
Documentation: pkg.go.dev

# Functions

AlreadyExists is a 409-style error that is used when attempting to create some record/resource, but there is already a duplicate instance in existence.
BadCredentials is a 401-style error that indicates that the caller either didn't provide credentials when necessary or they did, but the credentials were invalid for some reason.
BadRequest is a 400-style error that indicates that some aspect of the request was either ill-formed or failed validation.
InternalServerError is a generic 500-style catch-all error for failures you don't know what to do with.
IsAlreadyExists returns true if the underlying HTTP status code of 'err' is 409.
IsBadCredentials returns true if the underlying HTTP status code of 'err' is 401.
IsBadRequest returns true if the underlying HTTP status code of 'err' is 400.
IsInternalServiceError returns true if the underlying HTTP status code of 'err' is 500.
IsNotFound returns true if the underlying HTTP status code of 'err' is 404.
IsPermissionDenied returns true if the underlying HTTP status code of 'err' is 403.
IsThrottled returns true if the underlying HTTP status code of 'err' is 429.
IsTimeout returns true if the underlying HTTP status code of 'err' is 408.
IsUnavailable returns true if the underlying HTTP status code of 'err' is 503.
IsUnexpected returns true if the underlying HTTP status code of 'err' is 500.
New creates an error that maps directly to an HTTP status so if your RPC call results in this error, it will result in the same 'status' in your HTTP response.
NotFound is a 404-style error that indicates that some record/resource could not be located.
PermissionDenied is a 403-style error that indicates that the caller does not have rights/clearance to perform any part of the operation.
Status looks for either a Status(), StatusCode(), or Code() method on the error to figure out the most appropriate HTTP status code for it.
Throttled is a 429-style error that indicates that the caller has exceeded the number of requests, amount of resources, etc allowed over some time period.
Timeout is a 408-style error that indicates that some operation exceeded its allotted time/deadline.
Unavailable is a 503-style error that indicates that some aspect of the server/service is unavailable.
Unexpected is a generic 500-style catch-all error for failures you don't know what to do with.

# Structs

RPCError is an error that encodes a human-readable message as well as a status that corresponds to the closest HTTP status code.