Back to godoc.org
github.com/pubnub/go/pnerr

package pnerr

v4.7.0+incompatible
Latest Go to latest
Published: Jun 10, 2020 | License: MIT | Module: github.com/pubnub/go

Index

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
Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
f or F : Jump to identifier