-
Notifications
You must be signed in to change notification settings - Fork 525
/
common_error.json
95 lines (94 loc) · 3.87 KB
/
common_error.json
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
{
"$id": "docs/spec/errors/common_error.json",
"type": "object",
"description": "Data captured by an agent representing an event occurring in a monitored service",
"properties": {
"context": {
"$ref": "./../context.json"
},
"culprit": {
"description": "Function call which was the primary perpetrator of this event.",
"type": ["string", "null"]
},
"exception": {
"description": "Information about the originally thrown error.",
"type": ["object", "null"],
"properties": {
"code": {
"type": ["string", "integer", "null"],
"maxLength": 1024,
"description": "The error code set when the error happened, e.g. database error code."
},
"message": {
"description": "The original error message.",
"type": ["string", "null"]
},
"module": {
"description": "Describes the exception type's module namespace.",
"type": ["string", "null"],
"maxLength": 1024
},
"attributes": {
"type": ["object", "null"]
},
"stacktrace": {
"type": ["array", "null"],
"items": {
"$ref": "./../stacktrace_frame.json"
},
"minItems": 0
},
"type": {
"type": ["string", "null"],
"maxLength": 1024
},
"handled": {
"type": ["boolean", "null"],
"description": "Indicator whether the error was caught somewhere in the code or not."
}
},
"anyOf": [
{"required": ["message"], "properties": {"message": {"type": "string"}}},
{"required": ["type"], "properties": {"type": {"type": "string"}}}
]
},
"log": {
"type": ["object", "null"],
"description": "Additional information added when logging the error.",
"properties": {
"level": {
"description": "The severity of the record.",
"type": ["string", "null"],
"maxLength": 1024
},
"logger_name": {
"description": "The name of the logger instance used.",
"type": ["string", "null"],
"default": "default",
"maxLength": 1024
},
"message": {
"description": "The additionally logged error message.",
"type": "string"
},
"param_message": {
"description": "A parametrized message. E.g. 'Could not connect to %s'. The property message is still required, and should be equal to the param_message, but with placeholders replaced. In some situations the param_message is used to group errors together. The string is not interpreted, so feel free to use whichever placeholders makes sense in the client languange.",
"type": ["string", "null"],
"maxLength": 1024
},
"stacktrace": {
"type": ["array", "null"],
"items": {
"$ref": "./../stacktrace_frame.json"
},
"minItems": 0
}
},
"required": ["message"]
}
},
"anyOf": [
{ "required": ["exception"], "properties": {"exception": { "type": "object" }} },
{ "required": ["log"], "properties": {"log": { "type": "object" }} }
]
}