Source File
unmarshal_error.go
Belonging Package
github.com/aws/aws-sdk-go/private/protocol
package protocol
import (
)
type UnmarshalErrorHandler struct {
unmarshaler ErrorUnmarshaler
}
type ErrorUnmarshaler interface {
UnmarshalError(*http.Response, ResponseMetadata) (error, error)
}
func ( ErrorUnmarshaler) *UnmarshalErrorHandler {
return &UnmarshalErrorHandler{
unmarshaler: ,
}
}
const UnmarshalErrorHandlerName = "awssdk.protocol.UnmarshalError"
func ( *UnmarshalErrorHandler) () request.NamedHandler {
return request.NamedHandler{
Name: UnmarshalErrorHandlerName,
Fn: .UnmarshalError,
}
}
func ( *UnmarshalErrorHandler) ( *request.Request) {
defer .HTTPResponse.Body.Close()
:= ResponseMetadata{
StatusCode: .HTTPResponse.StatusCode,
RequestID: .RequestID,
}
, := .unmarshaler.UnmarshalError(.HTTPResponse, )
if != nil {
.Error = awserr.NewRequestFailure(
awserr.New(request.ErrCodeSerialization,
"failed to unmarshal response error", ),
.StatusCode,
.RequestID,
)
return
}
.Error =
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |