errors

package
v0.4.9 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2025 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAPIError

func NewAPIError(operation string, res *resty.Response) error

func NewAPIErrorWithResponse

func NewAPIErrorWithResponse(operation string, res *resty.Response) error

func NewRequestError

func NewRequestError(operation string, err error) error

Types

type APIError

type APIError struct {
	Operation    string `json:"operation"`
	Method       string `json:"method"`
	URL          string `json:"url"`
	StatusCode   int    `json:"statusCode"`
	ErrorMessage string `json:"message,omitempty"`
}

APIError represents an error response from the API

func (*APIError) Error

func (e *APIError) Error() string

type RequestError

type RequestError struct {
	Operation string `json:"operation"`
	// contains filtered or unexported fields
}

RequestError represents an error that occurred during an API request

func (*RequestError) Error

func (e *RequestError) Error() string

Jump to

Keyboard shortcuts

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