Versions in this module Expand all Collapse all v11 v11.2.0 Aug 18, 2026 v11.1.0 Aug 18, 2026 v11.0.0 Aug 18, 2026 Changes in this version + func ErrorForCode(code ErrorCode) error + func HTTPStatusForCode(code ErrorCode) int + func RegisterHTTPErrorMapper(m HTTPErrorMapper) + type APIError struct + Code ErrorCode + Message string + func (e *APIError) AsError() error + func (e *APIError) Error() string + type APIResponse struct + Data T + Details ResponseDetails + Error *APIError + Pagination *filtering.Pagination + func NewAPIErrorResponse(issue string, code ErrorCode, details ResponseDetails) *APIResponse[any] + func ToAPIResponse(err error) (int, *APIResponse[any]) + type ErrorCode string + const ErrActionLinkUnusable + const ErrCircuitBroken + const ErrDataNotFound + const ErrDecodingRequestInput + const ErrEncryptionIssue + const ErrFetchingSessionContextData + const ErrIdempotencyKeyInFlight + const ErrIdempotencyKeyReused + const ErrInvalidRequestSignature + const ErrInvalidSearchCursor + const ErrMisbehavingDependency + const ErrNotEntitled + const ErrNothingSpecific + const ErrQuotaExhausted + const ErrResourceConflict + const ErrSearchWindowExceeded + const ErrSecretGeneration + const ErrTalkingToDatabase + const ErrTalkingToSearchProvider + const ErrTooManyRequests + const ErrUserIsBanned + const ErrUserIsNotAuthorized + const ErrValidatingRequestInput + func ToAPIError(err error) (code ErrorCode, msg string) + type HTTPErrorMapper interface + Map func(err error) (code ErrorCode, msg string, ok bool) + var PlatformMapper HTTPErrorMapper = platformMapper{} + type ResponseDetails struct + CurrentAccountID string + TraceID string Other modules containing this package github.com/primandproper/platform-go github.com/primandproper/platform-go/v10 github.com/primandproper/platform-go/v2 github.com/primandproper/platform-go/v3 github.com/primandproper/platform-go/v4 github.com/primandproper/platform-go/v5 github.com/primandproper/platform-go/v6 github.com/primandproper/platform-go/v7 github.com/primandproper/platform-go/v8 github.com/primandproper/platform-go/v9