sferror

package
v0.12.2 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const StatusExpiredAccessToken = 498

StatusExpiredAccessToken is an HTTP status code used when an access token is expired.

Variables

This section is empty.

Functions

func StatusCode added in v0.6.0

func StatusCode(err error) int

StatusCode returns the HTTP status code.

Types

type SFError

type SFError struct {
	HTTPCode   int `json:"-"`
	FieldError err `json:"error"`
}

An SFError represents the error format that can be rendered by stnadardfile server.

func New

func New(message string) *SFError

New returns a new SFError with the given message.

func NewWithTagCode added in v0.6.0

func NewWithTagCode(code int, tag, message string) *SFError

NewWithTagCode returns a new SFError with the given code, tag and message.

func (*SFError) Error

func (e *SFError) Error() string

Error implements error interface.

Jump to

Keyboard shortcuts

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