Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrDetails ¶
type ErrDetails struct { ErrorInfo *errdetails.ErrorInfo `json:"errorInfo,omitempty"` BadRequest *errdetails.BadRequest `json:"badRequest,omitempty"` PreconditionFailure *errdetails.PreconditionFailure `json:"preconditionFailure,omitempty"` QuotaFailure *errdetails.QuotaFailure `json:"quotaFailure,omitempty"` RetryInfo *errdetails.RetryInfo `json:"retryInfo,omitempty"` ResourceInfo *errdetails.ResourceInfo `json:"resourceInfo,omitempty"` RequestInfo *errdetails.RequestInfo `json:"requestInfo,omitempty"` DebugInfo *errdetails.DebugInfo `json:"debugInfo,omitempty"` Help *errdetails.Help `json:"help,omitempty"` LocalizedMessage *errdetails.LocalizedMessage `json:"localizedMessage,omitempty"` // Unknown stores unidentifiable error details. Unknown []interface{} `json:"unknown,omitempty"` }
ErrDetails holds the google/rpc/error_details.proto messages.
type StakingAPIError ¶
type StakingAPIError struct {
// contains filtered or unexported fields
}
func FromError ¶
func FromError(err error) *StakingAPIError
FromError parses a googleapi.Error and builds a StakingAPIError.
func (*StakingAPIError) Code ¶
func (s *StakingAPIError) Code() int
Code presents the HTTP code of the APIError.
func (*StakingAPIError) Details ¶
func (s *StakingAPIError) Details() ErrDetails
Details presents the error details of the APIError.
func (*StakingAPIError) Error ¶
func (s *StakingAPIError) Error() string
Error returns a readable representation of the StakingAPIError.
func (*StakingAPIError) Message ¶
func (s *StakingAPIError) Message() string
Message presents the high level error message of the APIError.
func (*StakingAPIError) Print ¶
func (s *StakingAPIError) Print() error
func (*StakingAPIError) Unwrap ¶
func (s *StakingAPIError) Unwrap() error
Unwrap extracts the original error.
Click to show internal directories.
Click to hide internal directories.