Documentation ¶
Overview ¶
This package provides a structured error type and functions to work with it. It is largely based on the work of Ben Johnson. Reference: https://www.gobeyond.dev/failure-is-your-domain/.
Index ¶
Constants ¶
View Source
const ( CodeConflict = "conflict" CodeInternal = "internal" CodeInvalid = "invalid" CodeNotFound = "notFound" )
Pre-defined error codes.
Variables ¶
This section is empty.
Functions ¶
func ErrorMessage ¶
func LogAndWriteRESError ¶
func LogAndWriteRESError(l errorLogger, w errorWriter, err error)
LogAndWriteRESError with the given logger and writer.
Types ¶
Click to show internal directories.
Click to hide internal directories.