mirror of
https://github.com/router-for-me/CLIProxyAPIPlus.git
synced 2026-03-22 17:21:49 +00:00
19 lines
672 B
Go
19 lines
672 B
Go
package api
|
|
|
|
// ErrorResponse represents a standard error response format for the API.
|
|
// It contains a single ErrorDetail field.
|
|
type ErrorResponse struct {
|
|
Error ErrorDetail `json:"error"`
|
|
}
|
|
|
|
// ErrorDetail provides specific information about an error that occurred.
|
|
// It includes a human-readable message, an error type, and an optional error code.
|
|
type ErrorDetail struct {
|
|
// A human-readable message providing more details about the error.
|
|
Message string `json:"message"`
|
|
// The type of error that occurred (e.g., "invalid_request_error").
|
|
Type string `json:"type"`
|
|
// A short code identifying the error, if applicable.
|
|
Code string `json:"code,omitempty"`
|
|
}
|