mirror of https://github.com/rwf2/Rocket.git
Clarify that 'Err' response is not a 'Responder'.
This commit is contained in:
parent
3660d00103
commit
4d7c052a92
|
@ -255,7 +255,7 @@ impl<'r, R: Responder<'r>> Responder<'r> for Option<R> {
|
|||
impl<'r, R: Responder<'r>, E: fmt::Debug> Responder<'r> for Result<R, E> {
|
||||
default fn respond_to(self, req: &Request) -> Result<Response<'r>, Status> {
|
||||
self.map(|r| r.respond_to(req)).unwrap_or_else(|e| {
|
||||
error_!("Response was `Err`: {:?}.", e);
|
||||
error_!("Response was a non-`Responder` `Err`: {:?}.", e);
|
||||
Err(Status::InternalServerError)
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue