-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ADR] Universal Error Specification #30
base: master
Are you sure you want to change the base?
Conversation
0f79999
to
ccbbaa8
Compare
c3a6b0a
to
533073d
Compare
36390ba
to
2b63e27
Compare
This pull request has been automatically marked as "Withdrawn". If this pull request is still relevant, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize reviewing it yet. Your contribution is very much appreciated!. |
62344df
to
d0ad86b
Compare
d0ad86b
to
f4941fa
Compare
c74c765
to
7bc6e20
Compare
42cbf9c
to
198484c
Compare
|
||
```js | ||
const error = { | ||
subject: '/data', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So does /data refer to top-level key? Would be helpful to see an example that uses nesting here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a relative JSON Path Pointer based on` whatever Command Message payload structure.
In this case,
const command = {
data: {
currency: "INVALID"
}
}
* Source is the source of the error event. It contains information about the | ||
* producer of the error event. | ||
*/ | ||
type Source = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should sources be exposed to end users? What if they refer to "meaningless" internal microservices?
I can imagine sources being translated before end user exposure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should sources be exposed to end users?
Yes
What if they refer to "meaningless" internal microservices?
Then, the clients decide to ignore the source, and there is not much to do on their end.
In practice, you wouldn't have that many of those errors that are not related to a subject from a given Command Message.
} | ||
|
||
/** | ||
* Stacktrace contains the stack trace of the error. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting to pass the stack trace around. (Assume this is NOT for end user exposure)
A practice we've been experimenting with is wherever we create an error, we also log out through a common error reporting module. Our log contains a correlation ID that we also put on the error.
This means we don't need to put things like stacktraces on the error, as the error will tell us where to find the stacktrace. Curious about your thoughts on this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I improved my writing.
The intent is that you would strip out the stacktraces out of the content before going out of your system. That information is only helpful to send to logging services.
6a4fe40
to
3ebada5
Compare
Interested?
Every comment, every link to any information about it, and every opinion is appreciated (including the opinionated and strong ones), as small as it could be.
Please participate.