Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsNotFound ¶
func ToHTTP ¶
func ToHTTP(err error, w http.ResponseWriter)
ToHTTP writes a structured JSON error response. Handlers call this in their error paths — no error-handling middleware needed.
Types ¶
type Code ¶
type Code int
Code is an enum of domain error codes. Maps to HTTP status codes for the server, and to exit codes / user messages for the CLI.
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
Error is the single error type for all domain errors. Handlers use ToHTTP() to convert it; CLI commands inspect Code() for UX.
func (*Error) HTTPStatus ¶
Click to show internal directories.
Click to hide internal directories.