error

package
v0.0.0-...-99248c7 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNoRowsFoundError

func IsNoRowsFoundError(err error) bool

func ReturnAuthenticationError

func ReturnAuthenticationError(c *gin.Context, err error)

func ReturnBadRequestError

func ReturnBadRequestError(c *gin.Context, err error)

func ReturnBadRequestValidatorError

func ReturnBadRequestValidatorError(c *gin.Context, err validator.ValidationErrors)

func ReturnConflictError

func ReturnConflictError(c *gin.Context, err error)

func ReturnInternalServerError

func ReturnInternalServerError(c *gin.Context, err error)

func ReturnNotFoundError

func ReturnNotFoundError(c *gin.Context, err error)

Types

type ApiError

type ApiError struct {
	Error      string                      `json:"error"`
	Validation []ApiRequestValidationError `json:"validation"`
}

type ApiRequestValidationError

type ApiRequestValidationError struct {
	Field string `json:"field"`
	Tag   string `json:"tag"`
}

Jump to

Keyboard shortcuts

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