errorinterface

package
v0.0.0-...-34adcc7 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorResponse

type ErrorResponse struct {
	Err            error `json:"-"` // low-level runtime error
	HTTPStatusCode int   `json:"-"` // http response status code

	Status string `json:"Status,omitempty"` // user-level status message
	Code   int64  `json:"Code,omitempty"`   // application-specific error code
	Error  string `json:"Error,omitempty"`  // application-level error message, for debugging
}

ErrorResponse renderer type for handling all sorts of errors.

func (*ErrorResponse) Render

Render sets the application-specific error code in AppCode.

Jump to

Keyboard shortcuts

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