-
Notifications
You must be signed in to change notification settings - Fork 597
/
errors.go
46 lines (39 loc) · 1.15 KB
/
errors.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// Code generated by smithy-go-codegen DO NOT EDIT.
package types
import (
"fmt"
smithy "github.com/aws/smithy-go"
)
// This error is thrown when a request is invalid.
type ComplexError struct {
Message *string
Header *string
TopLevel *string
Nested *ComplexNestedErrorData
}
func (e *ComplexError) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ComplexError) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ComplexError) ErrorCode() string { return "ComplexError" }
func (e *ComplexError) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// This error is thrown when an invalid greeting value is provided.
type InvalidGreeting struct {
Message *string
}
func (e *InvalidGreeting) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidGreeting) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidGreeting) ErrorCode() string { return "InvalidGreeting" }
func (e *InvalidGreeting) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }