Skip to content

Commit

Permalink
client-api: Add support for the Retry-After header
Browse files Browse the repository at this point in the history
According to MSC4041 / Matrix 1.10

Co-authored-by: Jonas Platte <[email protected]>
  • Loading branch information
zecakeh and jplatte authored Apr 7, 2024
1 parent 1e185dd commit 31dc4a2
Show file tree
Hide file tree
Showing 5 changed files with 353 additions and 36 deletions.
3 changes: 3 additions & 0 deletions crates/ruma-client-api/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ Breaking changes:
- `Error` is now non-exhaustive.
- `ErrorKind::Forbidden` is now a non-exhaustive struct variant that can be
constructed with `ErrorKind::forbidden()`.
- The `retry_after_ms` field of `ErrorKind::LimitExceeded` was renamed to
`retry_after` and is now an `Option<RetryAfter>`, to add support for the
Retry-After header, according to MSC4041 / Matrix 1.10

Improvements:

Expand Down
3 changes: 3 additions & 0 deletions crates/ruma-client-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ unstable-msc3983 = []
as_variant = { workspace = true }
assign = { workspace = true }
bytes = "1.0.1"
date_header = "1.0.5"
http = { workspace = true }
js_int = { workspace = true, features = ["serde"] }
js_option = "0.1.1"
Expand All @@ -61,6 +62,8 @@ ruma-events = { workspace = true }
serde = { workspace = true }
serde_html_form = { workspace = true }
serde_json = { workspace = true }
thiserror = { workspace = true }
web-time = { workspace = true }

[dev-dependencies]
assert_matches2 = { workspace = true }
Loading

0 comments on commit 31dc4a2

Please sign in to comment.