Skip to content

Commit 3ec680c

Browse files
authored
Provide more data in Path deserialization error (#574)
* Provide more error in `Path` deserialization error * Rename * Add error kind for deserializing sequences * Rename * Fix wrong docs * Rename `MissingRouteParams` * Rename error to have more consistency * Rename internal error * Update changelog * One last renaming, for now * Add tests * Tweak changelog a bit
1 parent 66c5142 commit 3ec680c

8 files changed

Lines changed: 658 additions & 137 deletions

File tree

axum/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4646
- **breaking:** The `Body` and `BodyError` associated types on the
4747
`IntoResponse` trait have been removed - instead, `.into_response()` will now
4848
always return `Response<BoxBody>` ([#571])
49+
- **breaking:** `PathParamsRejection` has been renamed to `PathRejection` and its
50+
variants renamed to `FailedToDeserializePathParams` and `MissingPathParams`. This
51+
makes it more consistent with the rest of axum ([#574])
52+
- **added:** `Path`'s rejection type now provides data about exactly which part of
53+
the path couldn't be deserialized ([#574])
4954

5055
[#525]: https://github.com/tokio-rs/axum/pull/525
5156
[#527]: https://github.com/tokio-rs/axum/pull/527
@@ -54,6 +59,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
5459
[#554]: https://github.com/tokio-rs/axum/pull/554
5560
[#564]: https://github.com/tokio-rs/axum/pull/564
5661
[#571]: https://github.com/tokio-rs/axum/pull/571
62+
[#574]: https://github.com/tokio-rs/axum/pull/574
5763

5864
# 0.3.3 (13. November, 2021)
5965

axum/src/extract/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use rejection::*;
66

77
pub mod connect_info;
88
pub mod extractor_middleware;
9+
pub mod path;
910
pub mod rejection;
1011

1112
#[cfg(feature = "ws")]
@@ -16,7 +17,6 @@ mod content_length_limit;
1617
mod extension;
1718
mod form;
1819
mod matched_path;
19-
mod path;
2020
mod query;
2121
mod raw_query;
2222
mod request_parts;

0 commit comments

Comments
 (0)