Documentation
¶
Overview ¶
Package smithy provides the core components for a Smithy SDK.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIError ¶
type APIError interface {
error
// ErrorCode returns the error code for the API exception.
ErrorCode() string
// ErrorMessage returns the error message for the API exception.
ErrorMessage() string
// ErrorFault returns the fault for the API exception.
ErrorFault() ErrorFault
}
APIError provides the generic API and protocol agnostic error type all SDK generated exception types will implement.
type CanceledError ¶
type CanceledError struct {
Err error
}
CanceledError is the error that will be returned by an API request that was canceled. API operations given a Context may return this error when canceled.
func (*CanceledError) CanceledError ¶
func (*CanceledError) CanceledError() bool
CanceledError returns true to satisfy interfaces checking for canceled errors.
func (*CanceledError) Error ¶
func (e *CanceledError) Error() string
func (*CanceledError) Unwrap ¶
func (e *CanceledError) Unwrap() error
Unwrap returns the underlying error, if there was one.
type DeserializationError ¶
DeserializationError provides a wrapper for an error that occurs during deserialization.
func (*DeserializationError) Error ¶
func (e *DeserializationError) Error() string
Error returns a formatted error for DeserializationError
func (*DeserializationError) Unwrap ¶
func (e *DeserializationError) Unwrap() error
Unwrap returns the underlying Error in DeserializationError
type ErrorFault ¶
type ErrorFault int
ErrorFault provides the type for a Smithy API error fault.
const ( FaultUnknown ErrorFault = iota FaultServer FaultClient )
ErrorFault enumeration values
func (ErrorFault) String ¶
func (f ErrorFault) String() string
type GenericAPIError ¶
type GenericAPIError struct {
Code string
Message string
Fault ErrorFault
}
GenericAPIError provides a generic concrete API error type that SDKs can use to deserialize error responses into. Should be used for unmodeled or untyped errors.
func (*GenericAPIError) Error ¶
func (e *GenericAPIError) Error() string
func (*GenericAPIError) ErrorCode ¶
func (e *GenericAPIError) ErrorCode() string
ErrorCode returns the error code for the API exception.
func (*GenericAPIError) ErrorFault ¶
func (e *GenericAPIError) ErrorFault() ErrorFault
ErrorFault returns the fault for the API exception.
func (*GenericAPIError) ErrorMessage ¶
func (e *GenericAPIError) ErrorMessage() string
ErrorMessage returns the error message for the API exception.
type InvalidParamError ¶
type InvalidParamError interface {
error
// Field name the error occurred on.
Field() string
// SetContext updates the context of the error.
SetContext(string)
// AddNestedContext updates the error's context to include a nested level.
AddNestedContext(string)
}
An InvalidParamError represents an invalid parameter error type.
type InvalidParamsError ¶
type InvalidParamsError struct {
// Context is the base context of the invalid parameter group.
Context string
// contains filtered or unexported fields
}
An InvalidParamsError provides wrapping of invalid parameter errors found when validating API operation input parameters.
func (*InvalidParamsError) Add ¶
func (e *InvalidParamsError) Add(err InvalidParamError)
Add adds a new invalid parameter error to the collection of invalid parameters. The context of the invalid parameter will be updated to reflect this collection.
func (*InvalidParamsError) AddNested ¶
func (e *InvalidParamsError) AddNested(nestedCtx string, nested InvalidParamsError)
AddNested adds the invalid parameter errors from another InvalidParamsError value into this collection. The nested errors will have their nested context updated and base context to reflect the merging.
Use for nested validations errors.
func (InvalidParamsError) Error ¶
func (e InvalidParamsError) Error() string
Error returns the string formatted form of the invalid parameters.