apierrors

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 9, 2025 License: Apache-2.0 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 BadRequestError

type BadRequestError struct {
	Message              *string        `json:"message,omitempty"`
	AdditionalProperties map[string]any `additionalProperties:"true" json:"-"`
}

BadRequestError - A collection of codes that generally means the end user got something wrong in making the request

func (*BadRequestError) Error

func (e *BadRequestError) Error() string

type InternalServerError

type InternalServerError struct {
	Message              *string        `json:"message,omitempty"`
	AdditionalProperties map[string]any `additionalProperties:"true" json:"-"`
}

InternalServerError - A collection of status codes that generally mean the server failed in an unexpected way

func (*InternalServerError) Error

func (e *InternalServerError) Error() string

type NotFoundError

type NotFoundError struct {
	Message              *string        `json:"message,omitempty"`
	AdditionalProperties map[string]any `additionalProperties:"true" json:"-"`
}

NotFoundError - Status codes relating to the resource/entity they are requesting not being found or endpoints/routes not existing

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

type RateLimitedError

type RateLimitedError struct {
	Message              *string        `json:"message,omitempty"`
	AdditionalProperties map[string]any `additionalProperties:"true" json:"-"`
}

RateLimitedError - Status codes relating to the client being rate limited by the server

func (*RateLimitedError) Error

func (e *RateLimitedError) Error() string

type TimeoutError

type TimeoutError struct {
	Message              *string        `json:"message,omitempty"`
	AdditionalProperties map[string]any `additionalProperties:"true" json:"-"`
}

TimeoutError - Timeouts occurred with the request

func (*TimeoutError) Error

func (e *TimeoutError) Error() string

type UnauthorizedError

type UnauthorizedError struct {
	Message              *string        `json:"message,omitempty"`
	AdditionalProperties map[string]any `additionalProperties:"true" json:"-"`
}

UnauthorizedError - A collection of codes that generally means the client was not authenticated correctly for the request they want to make

func (*UnauthorizedError) Error

func (e *UnauthorizedError) Error() string

Jump to

Keyboard shortcuts

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