File tree 1 file changed +11
-0
lines changed
1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,14 @@ type ErrorsPayload struct {
23
23
Errors []* ErrorObject `json:"errors"`
24
24
}
25
25
26
+ // ErrorObjectLinks is an implementation of the JSON API error links payload.
27
+ //
28
+ // For more information on the JSON API spec's error links objects, see: http://jsonapi.org/format/#error-objects
29
+ type ErrorObjectLinks struct {
30
+ // About is a link that leads to further details about this particular occurrence of the problem.
31
+ About string `json:"about"`
32
+ }
33
+
26
34
// ErrorObject is an `Error` implementation as well as an implementation of the JSON API error object.
27
35
//
28
36
// The main idea behind this struct is that you can use it directly in your code as an error type
@@ -45,6 +53,9 @@ type ErrorObject struct {
45
53
// Code is an application-specific error code, expressed as a string value.
46
54
Code string `json:"code,omitempty"`
47
55
56
+ // Links is an implementation of the JSON API error links payload.
57
+ Links * ErrorObjectLinks `json:"links,omitempty"`
58
+
48
59
// Meta is an object containing non-standard meta-information about the error.
49
60
Meta * map [string ]interface {} `json:"meta,omitempty"`
50
61
}
You can’t perform that action at this time.
0 commit comments