errorutil

package
v1.1.9 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2023 License: UPL-1.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CannotParseRequest                     string = "CannotParseRequest"
	InvalidParameters                      string = "InvalidParameters"
	InvalidParameter                       string = "InvalidParameter"
	LimitExceeded                          string = "LimitExceeded"
	MissingParameters                      string = "MissingParameters"
	MissingParameter                       string = "MissingParameter"
	QuotaExceeded                          string = "QuotaExceeded"
	RelatedResourceNotAuthorizedOrNotFound string = "RelatedResourceNotAuthorizedOrNotFound"
	NotAuthenticated                       string = "NotAuthenticated"
	SignUpRequired                         string = "SignUpRequired"
	NotAuthorizedOrNotFound                string = "NotAuthorizedOrNotFound"
	NotFound                               string = "NotFound"
	MethodNotAllowed                       string = "MethodNotAllowed"
	IncorrectState                         string = "IncorrectState"
	InvalidatedRetryToken                  string = "InvalidatedRetryToken"
	NotAuthorizedOrResourceAlreadyExists   string = "NotAuthorizedOrResourceAlreadyExists"
	NotAuthorized                          string = "NotAuthorized"
	NoEtagMatch                            string = "NoEtagMatch"
	TooManyRequests                        string = "TooManyRequests"
	InternalServerError                    string = "InternalServerError"
	MethodNotImplemented                   string = "MethodNotImplemented"
	ServiceUnavailable                     string = "ServiceUnavailable"
)

Variables

This section is empty.

Functions

func BadRequestResponse

func BadRequestResponse(err error, description string) error

For 400 errors

func ConflictResponse

func ConflictResponse(err error, description string) error

For 409 errors

func InternalServerErrorResponse

func InternalServerErrorResponse(err error, description string) error

For 500 error

func MethodNotAllowedResponse

func MethodNotAllowedResponse(err error, description string) error

For 405 errors

func MethodNotImplementedResponse

func MethodNotImplementedResponse(err error, description string) error

For 501 error

func NewServiceFailureFromResponse

func NewServiceFailureFromResponse(code string, statusCode int, opcRequestId string, message string) (bool, error)

func NoEtagMatchResponse

func NoEtagMatchResponse(err error, description string) error

For 412 errors

func NotAuthenticatedResponse

func NotAuthenticatedResponse(err error, description string) error

For 401 errros

func OciErrorTypeResponse

func OciErrorTypeResponse(err error) (bool, error)

func ServiceUnavailableResponse

func ServiceUnavailableResponse(err error, description string) error

For 503 error

func SignUpRequiredResponse

func SignUpRequiredResponse(err error, description string) error

For 402 errors

func TooManyRequestsResponse

func TooManyRequestsResponse(err error, description string) error

For 429 Error

func UnauthorizedAndNotFoundResponse

func UnauthorizedAndNotFoundResponse(err error, description string) error

For 403 and 404 errors

Types

type BadRequestOciError

type BadRequestOciError OciErrors

For 400 errors

func (BadRequestOciError) Error

func (bd BadRequestOciError) Error() string

type ConflictOciError

type ConflictOciError OciErrors

For 409 errors

func (ConflictOciError) Error

func (c ConflictOciError) Error() string

type InternalServerErrorOciError

type InternalServerErrorOciError OciErrors

For 500 Error

func (InternalServerErrorOciError) Error

type MethodNotAllowedOciError

type MethodNotAllowedOciError OciErrors

For 405 errors

func (MethodNotAllowedOciError) Error

func (mna MethodNotAllowedOciError) Error() string

type MethodNotImplementedOciError

type MethodNotImplementedOciError OciErrors

For 501 Error

func (MethodNotImplementedOciError) Error

type NoEtagMatchOciError

type NoEtagMatchOciError OciErrors

For 412 errors

func (NoEtagMatchOciError) Error

func (nem NoEtagMatchOciError) Error() string

type NotAuthenticatedOciError

type NotAuthenticatedOciError OciErrors

For 401 errors

func (NotAuthenticatedOciError) Error

func (na NotAuthenticatedOciError) Error() string

type OciErrors

type OciErrors struct {
	HTTPStatusCode int    `json:"http-status-code,omitempty"`
	ErrorCode      string `json:"error-code,omitempty"`
	OpcRequestID   string `json:"opc-request-id,omitempty"`
	Description    string `json:"description,omitempty"`
}

func (OciErrors) Error

func (bd OciErrors) Error() string

type ServiceUnavailableOciError

type ServiceUnavailableOciError OciErrors

For 503 Error

func (ServiceUnavailableOciError) Error

type SignUpRequiredOciError

type SignUpRequiredOciError OciErrors

For 402 errors

func (SignUpRequiredOciError) Error

func (sr SignUpRequiredOciError) Error() string

type TooManyRequestsOciError

type TooManyRequestsOciError OciErrors

For 429 Error

func (TooManyRequestsOciError) Error

func (tmr TooManyRequestsOciError) Error() string

type UnauthorizedAndNotFoundOciError

type UnauthorizedAndNotFoundOciError OciErrors

For 403 and 404 errors

func (UnauthorizedAndNotFoundOciError) Error

Jump to

Keyboard shortcuts

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