Versions in this module Expand all Collapse all v1 v1.13.2 Feb 10, 2021 v1.13.1 Feb 9, 2021 Changes in this version + const ErrorCodeAPICallFailure + const ErrorCodeCryptoFailure + const ErrorCodeDatabaseFailure + const ErrorCodeDuplicateValue + const ErrorCodeEmptyRequestBody + const ErrorCodeHTTPCreateRequestFailure + const ErrorCodeInternalError + const ErrorCodeInvalidFields + const ErrorCodeInvalidFormData + const ErrorCodeInvalidJSON + const ErrorCodeInvalidPublicKey + const ErrorCodeInvalidRequestPayload + const ErrorCodeInvalidValue + const ErrorCodeJSONMarshalFailure + const ErrorCodeNotExists + const ErrorCodeReadWriteFailure + const ErrorCodeRequired + const ErrorCodeStringExpected + func IsUnexpectedError(err error) bool + func IsValidationError(err error) bool + type APICallError interface + GetAPIURL func() string + GetHTTPResponseBody func() *string + GetHTTPStatusCode func() *int + func NewAPICallError(apiURL string, httpStatusCode *int, httpResponseBody *string, err error) APICallError + type DatabaseError interface + IsRecordNotFoundError func() bool + func NewDatabaseError(err error) DatabaseError + type HTTPError struct + ErrorKey string + HTTPStatus int + func NewHTTPError(err string, httpStatus int) HTTPError + func (err HTTPError) Error() string + type HTTPResourceNotFound struct + ErrorKey string + ResourceName string + ResourceValue string + func NewHTTPResourceNotFound(resourceName, resourceValue string) HTTPResourceNotFound + func (e HTTPResourceNotFound) Error() string + type UnexpectedError interface + Error func() string + GetCause func() error + GetErrorCode func() string + GetStackTrace func() string + func NewCryptoError(err error) UnexpectedError + func NewDataReadWriteError(err error) UnexpectedError + func NewUnexpectedError(errCode string, err error) UnexpectedError + type ValidationError struct + ErrorKey string + Errors map[string]string + func NewInvalidFieldsError(failedFieldValidations map[string]string) ValidationError + func NewInvalidRequestPayloadError(errorCode string) ValidationError + func NewValidationError(errKey string, failedValidations map[string]string) ValidationError + func (e ValidationError) Error() string