ginresponse

package
v0.0.0-...-1c396e8 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultHTTPErrorCode = http.StatusInternalServerError

Variables

This section is empty.

Functions

func GinJSONError

func GinJSONError(ctx *gin.Context, myError error)

GinJSONError returns a JSON API formatted HTTP error through a Gin context

Types

type HTTPError

type HTTPError struct {
	Message       string
	HTTPErrorCode int
}

HTTPError contains information regarding a certain error

func (*HTTPError) Error

func (e *HTTPError) Error() string

HTTPError returns an error message string

Jump to

Keyboard shortcuts

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