File tree Expand file tree Collapse file tree 2 files changed +21
-21
lines changed Expand file tree Collapse file tree 2 files changed +21
-21
lines changed Original file line number Diff line number Diff line change @@ -21,3 +21,24 @@ const (
21
21
RequestCancelled ErrorCode = - 32800
22
22
ContentModified ErrorCode = - 32801
23
23
)
24
+
25
+ // Error ...
26
+ type Error struct {
27
+
28
+ // Code a number indicating the error type that occurred.
29
+ Code ErrorCode `json:"code"`
30
+
31
+ // Data a Primitive or Structured value that contains additional
32
+ // information about the error. Can be omitted.
33
+ Data []byte `json:"data"`
34
+
35
+ // Message a string providing a short description of the error.
36
+ Message string `json:"message"`
37
+ }
38
+
39
+ func (err * Error ) Error () string {
40
+ if err == nil {
41
+ return ""
42
+ }
43
+ return err .Message
44
+ }
Original file line number Diff line number Diff line change @@ -55,27 +55,6 @@ type Response struct {
55
55
Result []byte `json:"result,omitempty"`
56
56
}
57
57
58
- // Error ...
59
- type Error struct {
60
-
61
- // Code a number indicating the error type that occurred.
62
- Code ErrorCode `json:"code"`
63
-
64
- // Data a Primitive or Structured value that contains additional
65
- // information about the error. Can be omitted.
66
- Data []byte `json:"data"`
67
-
68
- // Message a string providing a short description of the error.
69
- Message string `json:"message"`
70
- }
71
-
72
- func (err * Error ) Error () string {
73
- if err == nil {
74
- return ""
75
- }
76
- return err .Message
77
- }
78
-
79
58
type NotificationMessage struct {
80
59
Message
81
60
You can’t perform that action at this time.
0 commit comments