go: github.com/pubnub/go/pnerr Index | Files

package pnerr

import "github.com/pubnub/go/pnerr"

Index

Package Files

types.go

type BuildRequestError Uses

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

Error building request with wrong params

func NewBuildRequestError Uses

func NewBuildRequestError(msg string) *BuildRequestError

func (BuildRequestError) Error Uses

func (e BuildRequestError) Error() string

func (BuildRequestError) OrigErr Uses

func (e BuildRequestError) OrigErr() error

type ConnectionError Uses

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

Something wrong with network connection.

func NewConnectionError Uses

func NewConnectionError(msg string, origError error) *ConnectionError

func (ConnectionError) Error Uses

func (e ConnectionError) Error() string

type ResponseParsingError Uses

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

Malformed request or issues with decoding encrypted message

func NewResponseParsingError Uses

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

func (ResponseParsingError) Error Uses

func (e ResponseParsingError) Error() string

type ServerError Uses

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 Uses

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

func (ServerError) Error Uses

func (e ServerError) Error() string

type ValidationError Uses

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 Uses

func NewValidationError(endpoint, msg string) *ValidationError

func (ValidationError) Error Uses

func (e ValidationError) Error() string

func (ValidationError) OrigErr Uses

func (e ValidationError) OrigErr() error

Package pnerr imports 3 packages (graph) and is imported by 2 packages. Updated 2018-06-19. Refresh now. Tools for package owners.