Versions in this module Expand all Collapse all v1 v1.0.0 Oct 10, 2026 Changes in this version + func MapErrorToHTTPStatus(err error) int + func StatusForCode(code ErrorCode) int + type APIError struct + Code ErrorCode + Details interface{} + Message string + func NewAPIError(code ErrorCode, message string, details interface{}) APIError + func (e APIError) Error() string + type ErrorCode string + const ErrAPIKeyInvalid + const ErrAPIKeyNotFound + const ErrAPIKeyOwnerRequired + const ErrAccDuplicate + const ErrAccGenerationFailed + const ErrAccNotFound + const ErrAdminBackupFailed + const ErrAuthCrossOwnerAccess + const ErrAuthExpiredAPIKey + const ErrAuthInsufficientPermissions + const ErrAuthInvalidAPIKey + const ErrAuthInvalidBearerToken + const ErrAuthMasterKeyRequired + const ErrAuthMetricsDisabled + const ErrAuthMetricsTokenRequired + const ErrAuthMissingAPIKey + const ErrAuthMissingPrincipal + const ErrAuthScopeEscalation + const ErrAuthUnknownResource + const ErrBadRequest + const ErrBalHistoryNotFound + const ErrBalInvalidTimestamp + const ErrBalMonitorNotFound + const ErrBalNotFound + const ErrBalValidation + const ErrConflict + const ErrGenBadRequest + const ErrGenConflict + const ErrGenInternal + const ErrGenMalformedRequest + const ErrGenMissingParameter + const ErrGenNotFound + const ErrGenPayloadTooLarge + const ErrGenRateLimited + const ErrGenResourceLocked + const ErrGenValidation + const ErrHookInvalid + const ErrHookNotFound + const ErrHookOperationFailed + const ErrIdtFieldAlreadyTokenized + const ErrIdtFieldNotFound + const ErrIdtFieldNotTokenizable + const ErrIdtFieldNotTokenized + const ErrIdtNotFound + const ErrIdtTokenizationDisabled + const ErrIdtValidation + const ErrInternalServer + const ErrInvalidInput + const ErrLgrDuplicate + const ErrLgrNotFound + const ErrMetaEntityNotFound + const ErrMetaInvalidEntityID + const ErrMetaUnsupportedEntity + const ErrNotFound + const ErrQueueBackpressure + const ErrRateLimited + const ErrReconExternalTxnsRequired + const ErrReconMatchingRulesRequired + const ErrReconNotFound + const ErrReconRuleInvalid + const ErrReconRuleNotFound + const ErrReconStartFailed + const ErrReconUploadFailed + const ErrReconUploadHostNotAllowed + const ErrReconUploadProcessingFailed + const ErrReconUploadURLInvalid + const ErrSrchFailed + const ErrSrchQueryInvalid + const ErrSrchReindexInProgress + const ErrSrchReindexNotStarted + const ErrTxnAlreadyCommitted + const ErrTxnAlreadyRefunded + const ErrTxnAlreadyVoided + const ErrTxnBulkEmpty + const ErrTxnBulkLimitExceeded + const ErrTxnCommitAmountExceeded + const ErrTxnDuplicateReference + const ErrTxnInsufficientFunds + const ErrTxnInvalidAmount + const ErrTxnInvalidDistribution + const ErrTxnInvalidStatusAction + const ErrTxnNotFound + const ErrTxnNotInflight + const ErrTxnPrecisionNotInteger + const ErrTxnValidation + func Normalize(code ErrorCode) ErrorCode + type ErrorResponse struct + Error APIError + func NewErrorResponse(code ErrorCode, message string, details interface{}) ErrorResponse