Documentation ¶
Overview ¶
Package bcerrors provides an error type for Blocky Cloud APIs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Code ¶
Code returns the codes.Code of err if it, or some error it wraps, is an *Error. If err is context.Canceled or context.DeadlineExceeded, or wraps one of those errors, it returns the Canceled or DeadlineExceeded codes, respectively. If err is nil, it returns the special code OK. Otherwise, it returns Unknown.
func DoNotWrap ¶
DoNotWrap reports whether an error should not be wrapped in the Error type from this package. It returns true if err is a retry error, a context error, io.EOF, or if it wraps one of those.
Types ¶
type Error ¶
type Error struct { // Code is the error code. Code codes.Code // contains filtered or unexported fields }
An Error describes a Go CDK error.
func New ¶
New returns a new error with the given code, underlying error and message. Pass 1 for the call depth if New is called from the function raising the error; pass 2 if it is called from a helper function that was invoked by the original function; and so on.
func (*Error) FormatError ¶
FormatError formats the errots.