errors

package
v0.0.0-...-e35233a Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2022 License: Apache-2.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbortWithError

func AbortWithError(ctx *gin.Context, code int, err error, details string)

AbortWithError stops the chain, writes the status code and the given error

func IsInternalServerError

func IsInternalServerError(err error) bool

func IsNotFound

func IsNotFound(err error) bool

Types

type Error

type Error struct {
	Status  string `json:"status"`
	Code    int    `json:"code"`
	Message string `json:"message"`
	Details string `json:"details"`
}

func NewInternalServerError

func NewInternalServerError(message, details string) *Error

func NewNotFoundError

func NewNotFoundError(message, details string) *Error

func (Error) Error

func (e Error) Error() string

Jump to

Keyboard shortcuts

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