Skip to content
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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

yordis
Copy link
Member

@yordis yordis commented Nov 3, 2022

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.

@yordis yordis force-pushed the univeral-error branch 7 times, most recently from 0f79999 to ccbbaa8 Compare November 3, 2022 06:55
@yordis yordis force-pushed the univeral-error branch 2 times, most recently from 36390ba to 2b63e27 Compare January 2, 2023 21:04
@stale
Copy link

stale bot commented Jun 10, 2023

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!.

@stale stale bot added the State: Withdrawn The ADR is withdrawn may be taken up by another champion. label Jun 10, 2023
@yordis yordis added State: Deferred The ADR has not been acted upon for a significant period of time. and removed State: Withdrawn The ADR is withdrawn may be taken up by another champion. labels Jun 10, 2023
@yordis yordis force-pushed the univeral-error branch 4 times, most recently from 62344df to d0ad86b Compare August 21, 2023 23:01
@yordis yordis force-pushed the univeral-error branch 7 times, most recently from c74c765 to 7bc6e20 Compare February 3, 2024 11:38
@yordis yordis force-pushed the univeral-error branch 3 times, most recently from 42cbf9c to 198484c Compare February 3, 2024 22:29

```js
const error = {
subject: '/data',
Copy link

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.

Copy link
Member Author

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"
  }
}

src/adrs/0129349218/README.md Outdated Show resolved Hide resolved
* Source is the source of the error event. It contains information about the
* producer of the error event.
*/
type Source = {
Copy link

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

Copy link
Member Author

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.
Copy link

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!

Copy link
Member Author

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.

@yordis yordis force-pushed the univeral-error branch 6 times, most recently from 6a4fe40 to 3ebada5 Compare February 23, 2024 18:28
@yordis yordis requested a review from acco March 21, 2024 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
State: Deferred The ADR has not been acted upon for a significant period of time.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants