Fix compilation with change from poem 1.2.x

This commit is contained in:
Brad Svercl 2021-12-16 18:11:09 -06:00
parent 0ae21b9914
commit c54bfca599

View File

@ -30,7 +30,7 @@ impl<'a> FromRequest<'a> for GraphQLProtocol {
.find_map(|p| WebSocketProtocols::from_str(p.trim()).ok())
})
.map(Self)
.ok_or_else(|| Error::new_with_status(StatusCode::BAD_REQUEST))
.ok_or_else(|| Error::from_status(StatusCode::BAD_REQUEST))
}
}