Documentation ¶ Index ¶ func Error(err error, ctx echo.Context) type HTTPError Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Error ¶ func Error(err error, ctx echo.Context) Error implements a custom echo error handler that will encode errors as JSON objects rather than just return a text body. It will also make sure to not have the redundant information given in the echo string encoding of HTTP errors. Types ¶ type HTTPError ¶ type HTTPError struct { Code int `json:"code"` Name string `json:"name"` Message string `json:"message"` Cause string `json:"cause,omitempty"` } HTTPError is our HTTP error definition. Source Files ¶ View all Source files error.go Click to show internal directories. Click to hide internal directories.