Skip to content

500 internal error on error pages #817

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

Closed
jyn514 opened this issue Jun 5, 2020 · 5 comments · Fixed by #858
Closed

500 internal error on error pages #817

jyn514 opened this issue Jun 5, 2020 · 5 comments · Fixed by #858
Labels
A-frontend Area: Web frontend C-bug Category: This is a bug S-needs-reproduction-steps Status: This problem hasn't been reproduced by the docs.rs team

Comments

@jyn514
Copy link
Member

jyn514 commented Jun 5, 2020

While trying to handle an error, docs.rs will run into more errors!

2020/06/05 17:59:14 [ERROR] cratesfyi::web: internal server error: Template not found: resp

Possibly relevant code:

.to_resp("resp");

cc @Kixiron

@jyn514 jyn514 added C-bug Category: This is a bug A-frontend Area: Web frontend S-needs-reproduction-steps Status: This problem hasn't been reproduced by the docs.rs team labels Jun 5, 2020
@Kixiron
Copy link
Member

Kixiron commented Jun 5, 2020

This is just weird as all get out, I think this may have been broken for an indefinite period of time, we've just never noticed it because it requires a ctry'd or cexpect'd internal server error, which (thankfully) don't happen often

@jyn514
Copy link
Member Author

jyn514 commented Jun 5, 2020

Originally I thought it might be caused by #805 but it's possible this has been happening much longer and just recently got revealed by #802.

@Kixiron
Copy link
Member

Kixiron commented Jun 5, 2020

#805 removed no code, it just added stuff

@Nemo157
Copy link
Member

Nemo157 commented Jun 5, 2020

I agree this this looks like it's just always been broken. I don't think #802 will have affected it since that only touched the error paths, this returns an Ok(BadRequest) (which seems wrong, all uses of ctry!/cexpect! seem like 500s, not 400s). (EDIT: Oh, but if by revealed you mean you got a 500 + a log-line instead of just a 404 when the template failed to render, maybe #802 could have made that happen).

Hitting any of the code paths that trigger this seems rare, they should all be "never happens" sorts of errors.

I think with the changes in #802 ctry and cexpect can probably be replaced by ?/.ok_or()? now, since that will now log the error and give back an error page.

@jyn514
Copy link
Member Author

jyn514 commented Jun 8, 2020

This will be fixed by #740.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-frontend Area: Web frontend C-bug Category: This is a bug S-needs-reproduction-steps Status: This problem hasn't been reproduced by the docs.rs team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants