Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type SpotifeteError ¶
func NewError ¶
func NewError(message string, cause error, httpStatus int) *SpotifeteError
Creates an error struct with the supplied message, cause and http status code The message and cause will be logged
This is useful for most cases, where the reason might be interesting for the user
func NewInternalError ¶
func NewInternalError(message string, cause error) *SpotifeteError
Creates an error struct with a standard message and http status 500 (Internal Server Error) The message and cause will be logged
This is useful if you don't want the user to see the details of the error
func NewUserError ¶
func NewUserError(message string) *SpotifeteError
Creates an error struct with the supplied message and http status 400 (Bad Request) Nothing will be logged
This is useful for user errors like missing parameters
Click to show internal directories.
Click to hide internal directories.