core

package
v0.0.0-...-325dcee Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 31, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ValidationErrors = func(w http.ResponseWriter, apiError []types.ApiError) {
		writeValidationError(w, apiError)
	}
	RequestErrorHandler = func(w http.ResponseWriter, err error) {
		writeError(w, err.Error(), http.StatusBadRequest)
	}
	InternalErrorHandler = func(w http.ResponseWriter) {
		writeError(w, "An Unexpected Error Occured", http.StatusInternalServerError)
	}
	UnauthorizedErrorHandler = func(w http.ResponseWriter) {
		writeError(w, "Unauthorized", http.StatusUnauthorized)
	}
	UserRegistrationError = func(w http.ResponseWriter) {
		writeError(w, "Please complete the registration process.", http.StatusNotFound)
	}
)

Functions

This section is empty.

Types

type Error

type Error struct {
	Code    int
	Message string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL