httpservermodel

package
v0.0.0-...-7acbbf3 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppError

type AppError struct {
	ErrorObject      error  `json:"error"`
	SanitisedMessage string `json:"message"`
	Code             int    `json:"code"`
}

AppError as app error container

func NewAppError

func NewAppError(errorObject error, message string, code int) *AppError

func (*AppError) Error

func (a *AppError) Error() string

Error returns the error string, or Message string in that order or priority.

type FriendlyError

type FriendlyError struct {
	Message string `json:"message"`
}

FriendlyError is sanitised error message sent back to the user

Jump to

Keyboard shortcuts

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