errors

package
v1.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrorTypeValidationError      = "https://kubernaut.ai/problems/validation-error"
	ErrorTypeUnsupportedMediaType = "https://kubernaut.ai/problems/unsupported-media-type"
	ErrorTypeMethodNotAllowed     = "https://kubernaut.ai/problems/method-not-allowed"
	ErrorTypeInternalError        = "https://kubernaut.ai/problems/internal-error"
	ErrorTypeServiceUnavailable   = "https://kubernaut.ai/problems/service-unavailable"
	ErrorTypeTooManyRequests      = "https://kubernaut.ai/problems/too-many-requests"
	ErrorTypePayloadTooLarge      = "https://kubernaut.ai/problems/payload-too-large"
	ErrorTypeGatewayTimeout       = "https://kubernaut.ai/problems/gateway-timeout"
	ErrorTypeUnknown              = "https://kubernaut.ai/problems/unknown"
)

Error type URI constants BR-041: RFC 7807 error format DD-004 v1.1: Updated from /errors/ to /problems/ (Dec 19, 2025) These URIs identify the problem type and can link to documentation

View Source
const (
	TitleBadRequest           = "Bad Request"
	TitleUnsupportedMediaType = "Unsupported Media Type"
	TitleMethodNotAllowed     = "Method Not Allowed"
	TitleInternalServerError  = "Internal Server Error"
	TitleServiceUnavailable   = "Service Unavailable"
	TitleTooManyRequests      = "Too Many Requests"
	TitlePayloadTooLarge      = "Request Entity Too Large"
	TitleGatewayTimeout       = "Gateway Timeout"
	TitleUnknown              = "Error"
)

Error title constants BR-041: RFC 7807 error format

Variables

This section is empty.

Functions

This section is empty.

Types

type RFC7807Error

type RFC7807Error struct {
	Type      string `json:"type"`                 // URI reference identifying the problem type
	Title     string `json:"title"`                // Short, human-readable summary
	Detail    string `json:"detail"`               // Human-readable explanation
	Status    int    `json:"status"`               // HTTP status code
	Instance  string `json:"instance"`             // URI reference to specific occurrence
	RequestID string `json:"request_id,omitempty"` // BR-109: Request tracing (extension member)
}

RFC7807Error represents an RFC 7807 Problem Details error response BR-041: RFC 7807 error format

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL