forked from thirdweb-dev/go-sdk
-
Notifications
You must be signed in to change notification settings - Fork 1
/
error.go
57 lines (44 loc) · 1.29 KB
/
error.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
47
48
49
50
51
52
53
54
55
56
57
package thirdweb
import "fmt"
type notFoundError struct {
identifier interface{}
}
func (m *notFoundError) Error() string {
return fmt.Sprintf("Could not find with id %v", m.identifier)
}
type unmarshalError struct {
body string
typeName string
UnderlyingError error
}
func (m *unmarshalError) Error() string {
return fmt.Sprintf("Could not unmarshal %v with body %v", m.typeName, m.body)
}
type noSignerError struct {
typeName string
Err error
}
func (m *noSignerError) Error() string {
return fmt.Sprintf("Could not proceed with transaction in %v module, missing SigningMethod", m.typeName)
}
type noAddressError struct {
typeName string
}
func (m *noAddressError) Error() string {
return fmt.Sprintf("Could not proceed with transaction in %v module, missing or invalid signer address", m.typeName)
}
type unsupportedFunctionError struct {
typeName string
body string
}
func (m *unsupportedFunctionError) Error() string {
return fmt.Sprintf("The method you're executing in the %v module is not supported yet. %v", m.typeName, m.body)
}
type failedToUploadError struct {
statusCode int
Payload interface{}
UnderlyingError error
}
func (m *failedToUploadError) Error() string {
return fmt.Sprintf("Failed to upload, status code = %d", m.statusCode)
}