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: https://github.com/rust-lang/docs.rs/blob/bdaf33b822247a428e11da64bc17e5699363b22b/src/web/mod.rs#L17
cc @Kixiron
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
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 https://github.com/rust-lang/docs.rs/pull/802.
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.
This will be fixed by https://github.com/rust-lang/docs.rs/issues/740.
Most helpful comment
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 ofctry!/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
ctryandcexpectcan probably be replaced by?/.ok_or()?now, since that will now log the error and give back an error page.