errs

package
v0.0.0-...-6a26343 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2024 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Common commonMessages = commonMessages{
	BadlyFormedObject: "Failed to read request. Please make sure your object is correctly formed.",
	DBFail:            "Something went wrong when accessing the database",
	NotFound:          "Could not find ",
	NotDeleted:        "Something went wrong when deleting ",
	NotUpdated:        "Something went wrong when updating ",
	NotCreated:        "Something went wrong when creating ",
	Unauthorized:      "You are not allowed to do that!",
	Login:             "Unable to log you in. Please try again.",
	NotSaved:          "Couldn't save the file. Please try again.",
}

Functions

This section is empty.

Types

type AppError

type AppError struct {
	Code    int    `json:",omitempty"`
	Message string `json:"message"`
}

func NewInvalidError

func NewInvalidError(message string) *AppError

func NewNotFoundError

func NewNotFoundError(message string) *AppError

func NewUnauthorizedError

func NewUnauthorizedError(message string) *AppError

func NewUnexpectedError

func NewUnexpectedError(message string) *AppError

Jump to

Keyboard shortcuts

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