pnerr

package
v4.1.6+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2019 License: MIT Imports: 3 Imported by: 14

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildRequestError

type BuildRequestError struct {
	// contains filtered or unexported fields
}

Error building request with wrong params

func NewBuildRequestError

func NewBuildRequestError(msg string) *BuildRequestError

func (BuildRequestError) Error

func (e BuildRequestError) Error() string

func (BuildRequestError) OrigErr

func (e BuildRequestError) OrigErr() error

type ConnectionError

type ConnectionError struct {
	OrigError error
	// contains filtered or unexported fields
}

Something wrong with network connection.

func NewConnectionError

func NewConnectionError(msg string, origError error) *ConnectionError

func (ConnectionError) Error

func (e ConnectionError) Error() string

type ResponseParsingError

type ResponseParsingError struct {
	Body      io.ReadCloser
	OrigError error
	// contains filtered or unexported fields
}

Malformed request or issues with decoding encrypted message

func NewResponseParsingError

func NewResponseParsingError(msg string,
	body io.ReadCloser, origError error) *ResponseParsingError

func (ResponseParsingError) Error

func (e ResponseParsingError) Error() string

type ServerError

type ServerError struct {
	StatusCode int
	Body       []byte
}

Server response has error code, for ex.: - BadRequest (400) - wrong params generated by SDK - Access Denied (403) - insufficient PAM permissions

func NewServerError

func NewServerError(statusCode int, body io.ReadCloser) *ServerError

func (ServerError) Error

func (e ServerError) Error() string

type ValidationError

type ValidationError struct {
	// contains filtered or unexported fields
}

Error validating type or value of passed in params. For ex. Channel Missing, Subscribe Key Missing, etc. In most cases this happens due an incorrect SDK usage. If you don't switch over this error type, you should be sure enough that passed in params are correct.

func NewValidationError

func NewValidationError(endpoint, msg string) *ValidationError

func (ValidationError) Error

func (e ValidationError) Error() string

func (ValidationError) OrigErr

func (e ValidationError) OrigErr() error

Jump to

Keyboard shortcuts

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