apierrors

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIError

type APIError struct {
	Message     string
	StatusCode  int
	Body        string
	RawResponse *http.Response
}

func NewAPIError

func NewAPIError(message string, statusCode int, body string, httpRes *http.Response) *APIError

func (*APIError) Error

func (e *APIError) Error() string

type ErrorResponse

type ErrorResponse struct {
	// URI that identifies the problem type.
	Type *string `json:"type,omitempty"`
	// HTTP status code generated by the origin server for this occurrence of the problem.
	Status *int64 `json:"status,omitempty"`
	// Short, human-readable summary of the problem type.
	Title *string `json:"title,omitempty"`
	// Human-readable explanation specific to this occurrence of the problem.
	Detail *string `json:"detail,omitempty"`
	// API-specific error code to help the provider team classify the error.
	Code *string `json:"code,omitempty"`
	// URI that identifies this specific occurrence of the problem.
	Instance *string                 `json:"instance,omitempty"`
	HTTPMeta components.HTTPMetadata `json:"-"`
}

ErrorResponse - Problem Details object (RFC 9457) describing the error.

func (*ErrorResponse) Error

func (e *ErrorResponse) Error() string

Jump to

Keyboard shortcuts

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