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

add detail field for internal error #13

Merged
merged 1 commit into from
Aug 30, 2022
Merged

add detail field for internal error #13

merged 1 commit into from
Aug 30, 2022

Conversation

WindSoilder
Copy link
Contributor

@WindSoilder WindSoilder commented Aug 17, 2022

Hi, I found it would be helpful to show one error's debug information, like this (the following example is using https://github.com/LukeMathWalker/tracing-bunyan-formatter)

[INTERNAL ERROR - EVENT] sent (error="database error occured",http.duration=202.429447ms,http.method=POST,http.status_code=500,http.target=/subscriptions,line=51,target=tide_tracing)
    detail: database error occured

    Caused by:
        0: error returned from database: column "subscription_token" of relation "subscription_tokens" does not exist
        1: column "subscription_token" of relation "subscription_tokens" does not exist
    --
    file: xxxxx

It shows the root cause of one error, which is helpful for debugging.

So I opened this pr to try to attach detail field.

Copy link
Owner

@eopb eopb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this. Thank you!

@eopb eopb merged commit 0790cd1 into eopb:master Aug 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants