sdkerrors

package
v2.0.0-rc.10 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorCode

type ErrorCode string
const (
	ErrorCodeValidation ErrorCode = "VALIDATION"
	ErrorCodeNotFound   ErrorCode = "NOT_FOUND"
	ErrorCodeInternal   ErrorCode = "INTERNAL"
)

func (ErrorCode) ToPointer

func (e ErrorCode) ToPointer() *ErrorCode

func (*ErrorCode) UnmarshalJSON

func (e *ErrorCode) UnmarshalJSON(data []byte) error

type ErrorResponse

type ErrorResponse struct {
	Details      *string           `json:"details,omitempty"`
	ErrorCode    shared.ErrorsEnum `json:"errorCode"`
	ErrorMessage string            `json:"errorMessage"`
}

ErrorResponse - Error

func (*ErrorResponse) Error

func (e *ErrorResponse) Error() string

type SDKError

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

func NewSDKError

func NewSDKError(message string, statusCode int, body string, httpRes *http.Response) *SDKError

func (*SDKError) Error

func (e *SDKError) Error() string

type V2Error

type V2Error struct {
	ErrorCode    ErrorCode `json:"errorCode"`
	ErrorMessage string    `json:"errorMessage"`
}

V2Error - General error

func (*V2Error) Error

func (e *V2Error) Error() string

type V2ErrorResponse

type V2ErrorResponse struct {
	Details      *string             `json:"details,omitempty"`
	ErrorCode    shared.V2ErrorsEnum `json:"errorCode"`
	ErrorMessage string              `json:"errorMessage"`
}

V2ErrorResponse - Error

func (*V2ErrorResponse) Error

func (e *V2ErrorResponse) Error() string

type WebhooksErrorResponse

type WebhooksErrorResponse struct {
	Details      *string                   `json:"details,omitempty"`
	ErrorCode    shared.WebhooksErrorsEnum `json:"errorCode"`
	ErrorMessage string                    `json:"errorMessage"`
}

WebhooksErrorResponse - Error

func (*WebhooksErrorResponse) Error

func (e *WebhooksErrorResponse) Error() string

Jump to

Keyboard shortcuts

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