Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WriteError ¶
func WriteError(w http.ResponseWriter, status int, msg, code string, details map[string]interface{})
WriteError writes a JSON error response.
Types ¶
type ErrorEnvelope ¶
type ErrorEnvelope struct {
Error string `json:"error"`
Code string `json:"code"`
Details map[string]interface{} `json:"details,omitempty"`
}
ErrorEnvelope is the standard error response format.
Click to show internal directories.
Click to hide internal directories.