package
0.0.0-20240309073012-30139a74a392
Repository: https://github.com/garaekz/go-rest-api.git
Documentation: pkg.go.dev
# Functions
BadRequest creates a new error response representing a bad request (HTTP 400).
Forbidden creates a new error response representing an authorization failure (HTTP 403).
Handler creates a middleware that handles panics and errors encountered during HTTP request processing.
InternalServerError creates a new error response representing an internal server error (HTTP 500).
InvalidInput creates a new error response representing a data validation error (HTTP 400).
NotFound creates a new error response representing a resource-not-found error (HTTP 404).
Unauthorized creates a new error response representing an authentication/authorization failure (HTTP 401).
# Structs
ErrorResponse is the response that represents an error.