error

package
v1.20.4 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2024 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ErrorInternal = iota

	ErrorNotAuthorized
	ErrorNotFound
	ErrorNameExists
	ErrorInvalidArgument
	ErrorNoSpace
	ErrorNotImplemented
	ErrorChecksumFail
	ErrorSizeLimitExceeded
	ErrorRequestTimeout
	ErrorTooManyRequests
)

Variables

This section is empty.

Functions

func GetHTTPError

func GetHTTPError(err error) (int, string)

func IsNotFound

func IsNotFound(err error) bool

func MakeErrorFromHTTP

func MakeErrorFromHTTP(resp *http.Response) error

Types

type Error

type Error struct {
	Code    errorCode `json:"code"`
	Message string    `json:"message"`
}

Errors returned by the Fission API.

func MakeError

func MakeError(code int, msg string) Error

func (Error) Description

func (err Error) Description() string

func (Error) Error

func (err Error) Error() string

func (Error) HTTPStatus

func (err Error) HTTPStatus() int

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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