errors

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MissingAuthorization is the error code for when the authorization header is missing in the api request.
	MissingAuthorization = 1

	// InvalidAuthorization is the error code for when the authorization is invalid.
	InvalidAuthorization = 2

	// InvalidFields is the error code for when one or more request fields are either missing or invalid.
	InvalidFields = 3

	// CantCleanTempFile is the error code for when the temporary file could not be cleaned on Game Jolt's servers.
	// This is an issue on GJ's end.
	CantCleanTempFile = 4

	// CantAttachBuild is the error code for when a build cannot be attached to the given package.
	// This can happen for many reason, check the error message for more info.
	CantAttachBuild = 5

	// UnknownError is the error code for any other unspecified error.
	UnknownError = 1000
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

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

Error is an error type returned by the API calls

func New

func New(err *models.Error) *Error

New creates a new API error

func (*Error) Code

func (e *Error) Code() int

Code returns the error code

func (*Error) Error

func (e *Error) Error() string

func (*Error) Fields

func (e *Error) Fields() []string

Fields returns the invalid or missing fields for the request

Jump to

Keyboard shortcuts

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