striveexceptions

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2024 License: MIT Imports: 1 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ServerErrorCode    = 500
	ServerErrorMsg     = "Internal Server Error"
	ServerErrorDetails = "An unexpected error occurred"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Exception

type Exception struct {
	FullError error
	Code      int    `json:"code"`
	Message   string `json:"message"`
	Details   string `json:"details"`
}

Exception is a struct that contains the error message and the error code

func ServerError

func ServerError(err error, message string, details string) Exception

func (Exception) Error

func (e Exception) Error() string

Jump to

Keyboard shortcuts

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