Skip to content

Revert #1043 until I come up with a more principled fix for #1051 #1052

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

Merged
merged 1 commit into from
Sep 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/web/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ mod tests {
.next()
.unwrap()
.text_contents(),
"The requested crate does not exist",
"The requested resource does not exist",
);

Ok(())
Expand Down Expand Up @@ -190,7 +190,7 @@ mod tests {
.next()
.unwrap()
.text_contents(),
"The requested version does not exist",
"The requested resource does not exist",
);

Ok(())
Expand All @@ -209,7 +209,7 @@ mod tests {
.next()
.unwrap()
.text_contents(),
"The requested version does not exist",
"The requested resource does not exist",
);

Ok(())
Expand All @@ -232,7 +232,7 @@ mod tests {
.next()
.unwrap()
.text_contents(),
"The requested version does not exist",
"The requested resource does not exist",
);

Ok(())
Expand Down
2 changes: 1 addition & 1 deletion src/web/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,9 @@ impl Handler for CratesfyiHandler {
// because it gives the most specific errors, e.g. CrateNotFound or VersionNotFound
self.shared_resource_handler
.handle(req)
.or_else(|e| if_404(e, || self.router_handler.handle(req)))
.or_else(|e| if_404(e, || self.database_file_handler.handle(req)))
.or_else(|e| if_404(e, || self.static_handler.handle(req)))
.or_else(|e| if_404(e, || self.router_handler.handle(req)))
.or_else(|e| {
let err = if let Some(err) = e.error.downcast::<error::Nope>() {
*err
Expand Down