sdkerrors

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 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 GlobalTestException

type GlobalTestException struct {
	// Represents the server's error code
	ServerCode int `json:"ServerCode"`
	// Represents the server's exception message
	ServerMessage string `json:"ServerMessage"`
}

GlobalTestException - To test specific global exceptions.

func (*GlobalTestException) Error

func (e *GlobalTestException) Error() string

type LocalTestException

type LocalTestException struct {
	// Represents the specific endpoint info
	SecretMessageForEndpoint string `json:"SecretMessageForEndpoint"`
	// Represents the server's error code
	ServerCode int `json:"ServerCode"`
	// Represents the server's exception message
	ServerMessage string `json:"ServerMessage"`
}

LocalTestException - To test specific local exceptions.

func (*LocalTestException) Error

func (e *LocalTestException) Error() string

type NestedModelException

type NestedModelException struct {
	ServerCode    string          `json:"ServerCode"`
	ServerMessage string          `json:"ServerMessage"`
	Model         shared.Validate `json:"model"`
}

NestedModelException - Precondition Failed

func (*NestedModelException) Error

func (e *NestedModelException) 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

Jump to

Keyboard shortcuts

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