scerror

package
v1.4.7 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrInvalidParams           int32 = 400001
	ErrUnhealthy               int32 = 400002
	ErrServiceAlreadyExists    int32 = 400010
	ErrServiceNotExists        int32 = 400012
	ErrDeployedInstance        int32 = 400013
	ErrUndefinedSchemaID       int32 = 400014
	ErrModifySchemaNotAllow    int32 = 400015
	ErrSchemaNotExists         int32 = 400016
	ErrInstanceNotExists       int32 = 400017
	ErrTagNotExists            int32 = 400018
	ErrRuleAlreadyExists       int32 = 400019
	ErrBlackAndWhiteRule       int32 = 400020
	ErrModifyRuleNotAllow      int32 = 400021
	ErrRuleNotExists           int32 = 400022
	ErrDependedOnConsumer      int32 = 400023
	ErrPermissionDeny          int32 = 400024
	ErrEndpointAlreadyExists   int32 = 400025
	ErrServiceVersionNotExists int32 = 400026
	ErrNotEnoughQuota          int32 = 400100

	ErrUnauthorized int32 = 401002

	ErrForbidden int32 = 403001

	ErrConflictAccount int32 = 409001

	ErrInternal           int32 = 500003
	ErrUnavailableBackend int32 = 500011
	ErrUnavailableQuota   int32 = 500101
)

Variables

This section is empty.

Functions

func RegisterErrors

func RegisterErrors(errs map[int32]string)

Types

type Error

type Error struct {
	Code    int32  `json:"errorCode,string"`
	Message string `json:"errorMessage"`
	Detail  string `json:"detail,omitempty"`
}

func NewError

func NewError(code int32, detail string) *Error

func NewErrorf

func NewErrorf(code int32, format string, args ...interface{}) *Error

func (*Error) Error

func (e *Error) Error() string

func (*Error) InternalError

func (e *Error) InternalError() bool

func (*Error) Marshal

func (e *Error) Marshal() []byte

func (*Error) StatusCode

func (e *Error) StatusCode() int

Jump to

Keyboard shortcuts

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