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

Improve ErrorState debugging #1768

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

rousskov
Copy link
Contributor

@rousskov rousskov commented Apr 1, 2024

In triage, it is often useful to know that ErrorState was created when
it was created rather than waiting for errorAppendEntry() or errorSend()
debugging, especially if those error handling stages are not reached.

Also report HTTP status code of the error response (when available).

In triage, it is often useful to know that ErrorState was created _when_
it was created rather than waiting for errorAppendEntry() or errorSend()
debugging, especially if those error handling stages are not reached.

Also report HTTP status code of the error response (when available).
Copy link
Contributor Author

@rousskov rousskov left a comment

Choose a reason for hiding this comment

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

This PR was triggered by #1767 (comment)

Sample output:

| 4,3| errorpage.cc(712) ErrorState: ERR_CANNOT_FORWARD/http_status=502
| 17,3| FwdState.cc(461) fail: ERR_CANNOT_FORWARD/http_status=502; was: [nil]
| 4,4| errorpage.cc(739) errorAppendEntry: storing ERR_CANNOT_FORWARD/http_status=502 in e:=p2XIHWV/0x55c661abe320*4
| 4,2| errorpage.cc(1411) buildBody: No existing error page language negotiated for ERR_CANNOT_FORWARD/http_status=502. Using default error file.

The comments in this review annotate the diff. They do not request any code changes.

src/FwdState.cc Show resolved Hide resolved
src/errorpage.cc Outdated Show resolved Hide resolved
Copy link
Contributor

@yadij yadij left a comment

Choose a reason for hiding this comment

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

Just some minor polish.

src/errorpage.cc Show resolved Hide resolved
src/errorpage.cc Outdated Show resolved Hide resolved
@yadij yadij added the S-waiting-for-author author action is expected (and usually required) label Apr 1, 2024
@rousskov rousskov requested a review from yadij April 1, 2024 17:30
@rousskov rousskov added S-waiting-for-reviewer ready for review: Set this when requesting a (re)review using GitHub PR Reviewers box and removed S-waiting-for-author author action is expected (and usually required) labels Apr 1, 2024
@yadij yadij added S-waiting-for-author author action is expected (and usually required) and removed S-waiting-for-reviewer ready for review: Set this when requesting a (re)review using GitHub PR Reviewers box labels Apr 2, 2024
@rousskov rousskov added S-waiting-for-reviewer ready for review: Set this when requesting a (re)review using GitHub PR Reviewers box and removed S-waiting-for-author author action is expected (and usually required) labels Apr 2, 2024
@squid-anubis squid-anubis added M-failed-other https://github.com/measurement-factory/anubis#pull-request-labels and removed M-failed-other https://github.com/measurement-factory/anubis#pull-request-labels labels Apr 5, 2024
@squid-anubis squid-anubis added M-failed-other https://github.com/measurement-factory/anubis#pull-request-labels and removed M-failed-other https://github.com/measurement-factory/anubis#pull-request-labels labels May 15, 2024
@yadij yadij added M-cleared-for-merge https://github.com/measurement-factory/anubis#pull-request-labels and removed S-waiting-for-reviewer ready for review: Set this when requesting a (re)review using GitHub PR Reviewers box labels Jun 5, 2024
squid-anubis pushed a commit that referenced this pull request Jun 5, 2024
In triage, it is often useful to know that ErrorState was created _when_
it was created rather than waiting for errorAppendEntry() or errorSend()
debugging, especially if those error handling stages are not reached.

Also report HTTP status code of the error response (when available).
@squid-anubis squid-anubis added the M-waiting-staging-checks https://github.com/measurement-factory/anubis#pull-request-labels label Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
M-cleared-for-merge https://github.com/measurement-factory/anubis#pull-request-labels M-waiting-staging-checks https://github.com/measurement-factory/anubis#pull-request-labels
Projects
None yet
3 participants