Documentation
¶
Overview ¶
Package problemtype defines canonical API problem type URIs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRequestID ¶
func NewRequestID() string
Types ¶
type Problem ¶
type Problem struct {
Type string `json:"type"`
Title string `json:"title"`
Status int `json:"status"`
Code string `json:"code"`
Detail string `json:"detail"`
RequestID string `json:"request_id"`
Details map[string]any `json:"details"`
}
Problem is the shared HTTP error envelope. an API owns its allowed codes, while this writer owns the fields and request correlation across services.
Click to show internal directories.
Click to hide internal directories.