server_errors

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogAndSendServerError

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

func WrapLogAndSendServerError added in v0.7.0

func WrapLogAndSendServerError(c *gin.Context, err error, message string)

Types

type ServerError

type ServerError struct {
	Errors struct {
		Fields map[string][]string `json:"fields"`
		Server []string            `json:"server"`
	} `json:"errors"`
}

func SingleFieldError

func SingleFieldError(field string, fieldError string) *ServerError

func SingleServerError

func SingleServerError(serverErrorDescription string) *ServerError

func (*ServerError) AddFieldError

func (se *ServerError) AddFieldError(field string, fieldError string)

func (*ServerError) AddServerError

func (se *ServerError) AddServerError(serverErrorDescription string)

Jump to

Keyboard shortcuts

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