errors

package
v0.0.0-...-2cf31f2 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 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 ServiceError

type ServiceError struct {
	Type    Type   `json:"type"`
	Message string `json:"message"`
	Status  int    `json:"status"`
}

func NewServiceError

func NewServiceError(errorType Type, message string, status int) *ServiceError

func (*ServiceError) Error

func (e *ServiceError) Error() string

type Type

type Type string
const (
	ValidationError   Type = "VALIDATION_ERROR"
	UnauthorizedError Type = "UNAUTHORIZED_ERROR"
	NotFoundError     Type = "NOT_FOUND_ERROR"
	InternalError     Type = "INTERNAL_ERROR"
	ConflictError     Type = "CONFLICT_ERROR"
	NotImplemented    Type = "NOT_IMPLEMENTED"
)

Jump to

Keyboard shortcuts

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