File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -144,7 +144,7 @@ mod tests {
144144 . next( )
145145 . unwrap( )
146146 . text_contents( ) ,
147- "The requested crate does not exist" ,
147+ "The requested resource does not exist" ,
148148 ) ;
149149
150150 Ok ( ( ) )
@@ -190,7 +190,7 @@ mod tests {
190190 . next( )
191191 . unwrap( )
192192 . text_contents( ) ,
193- "The requested version does not exist" ,
193+ "The requested resource does not exist" ,
194194 ) ;
195195
196196 Ok ( ( ) )
@@ -209,7 +209,7 @@ mod tests {
209209 . next( )
210210 . unwrap( )
211211 . text_contents( ) ,
212- "The requested version does not exist" ,
212+ "The requested resource does not exist" ,
213213 ) ;
214214
215215 Ok ( ( ) )
@@ -232,7 +232,7 @@ mod tests {
232232 . next( )
233233 . unwrap( )
234234 . text_contents( ) ,
235- "The requested version does not exist" ,
235+ "The requested resource does not exist" ,
236236 ) ;
237237
238238 Ok ( ( ) )
Original file line number Diff line number Diff line change @@ -183,9 +183,9 @@ impl Handler for CratesfyiHandler {
183183 // because it gives the most specific errors, e.g. CrateNotFound or VersionNotFound
184184 self . shared_resource_handler
185185 . handle ( req)
186+ . or_else ( |e| if_404 ( e, || self . router_handler . handle ( req) ) )
186187 . or_else ( |e| if_404 ( e, || self . database_file_handler . handle ( req) ) )
187188 . or_else ( |e| if_404 ( e, || self . static_handler . handle ( req) ) )
188- . or_else ( |e| if_404 ( e, || self . router_handler . handle ( req) ) )
189189 . or_else ( |e| {
190190 let err = if let Some ( err) = e. error . downcast :: < error:: Nope > ( ) {
191191 * err
You can’t perform that action at this time.
0 commit comments