Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct { Message string Err error Code ErrorCode Severity ErrorSeverity }
Error is a wrapper for an error value with added context.
type ErrorCode ¶
type ErrorCode int
const ( CodeUnexpected ErrorCode = http.StatusInternalServerError CodeNotFound ErrorCode = http.StatusNotFound CodeBadValue ErrorCode = http.StatusBadRequest )
HTTP status codes used to identify errors.
type ErrorSeverity ¶
type ErrorSeverity int
ErrorSeverity is used to classify the severity of an error. The zero value is SeverityErr.
const ( SeverityErr ErrorSeverity = iota SeverityWarn )
Severity levels
Click to show internal directories.
Click to hide internal directories.