apierrors

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2025 License: MIT Imports: 4 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 {
	Error_ *components.ErrorObject `json:"error,omitempty"`
}

ErrorResponse - Bad request

func (*ErrorResponse) Error

func (e *ErrorResponse) Error() string

type RateLimitedResponse

type RateLimitedResponse struct {
	Error_ *components.ErrorObject  `json:"error,omitempty"`
	Limits *components.LimitsObject `json:"limits,omitempty"`
}

RateLimitedResponse - Rate limited

func (*RateLimitedResponse) Error

func (e *RateLimitedResponse) Error() string

Jump to

Keyboard shortcuts

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