Documentation
¶
Index ¶
Constants ¶
View Source
const ( MissingTokenDescription = "no Authorization token was provided" MalformedTokenDescription = "the provided token does not meet the required format" InvalidUserNameDescription = "Unable to validate the username in the request" InvalidPasswordDescription = "Unable to validate the password in the request" InvalidForenameErrorDescription = "Unable to validate the user's forename in the request" InvalidSurnameErrorDescription = "Unable to validate the user's surname in the request" InvalidErrorDescription = "Unable to validate the email in the request" PasswordErrorDescription = "failed to generate password" RequestErrorDescription = "api endpoint POST user returned an error reading request body" UnmarshallingErrorDescription = "api endpoint POST user returned an error unmarshalling request body" DuplicateEmailFound = "duplicate email address found" NewUserModelErrorDescription = "Failed to create new user model" ListUsersErrorDescription = "Error in checking duplicate email address" AdminCreateUserErrorDescription = "Failed to create new user in user pool" MarshallingNewUserErrorDescription = "Failed to marshall json response" HttpResponseErrorDescription = "Failed to write http response" RequiredParameterNotFoundDescription = "error in parsing api setup arguments - missing parameter" InternalErrorException = "InternalErrorException" MissingRefreshTokenMessage = "no refresh token was provided" TokenExpiredMessage = "refresh token has expired" MissingIDTokenMessage = "no ID token was provided" MalformedIDTokenMessage = "the ID token could not be parsed" InternalErrorMessage = "an internal error has occurred" )
Variables ¶
View Source
var ErrDuplicateEmail = errors.New("duplicate email")
View Source
var ErrInvalidEmail = errors.New("invalid email")
View Source
var ErrInvalidForename = errors.New("invalid forename")
View Source
var ErrInvalidPassword = errors.New("invalid password")
View Source
var ErrInvalidSurname = errors.New("invalid surname")
View Source
var ErrInvalidUserName = errors.New("invalid username")
View Source
var InvalidIDTokenError = errors.New("invalid ID token")
View Source
var InvalidRefreshTokenError = errors.New("invalid refresh token")
View Source
var InvalidTokenError = errors.New("invalid token")
Functions ¶
func HandleUnexpectedError ¶
func IdentifyInternalError ¶
func WriteErrorResponse ¶
func WriteErrorResponse(ctx context.Context, w http.ResponseWriter, status int, errorResponseBody interface{})
Types ¶
type Error ¶
func IndividualErrorBuilder ¶
Click to show internal directories.
Click to hide internal directories.