Capture HTTP error response headers & handle Retry-After header (MSC4041) #4471
Include HTTP response headers in MatrixError
82f0fe81
Lint
dfb7439c
Support MSC4041 / Retry-After header
3fb662dd
Fix tests
f50f3b0c
robintown
approved these changes
on 2024-10-24
richvdh
requested changes
on 2024-10-25
AndrewFerr
changed the title Af/error headers Capture HTTP error response headers & handle Retry-After header (MSC4041) 1 year ago
Remove redundant MatrixError parameter properties
6a55da0a
Comment that retry_after_ms is deprecated
b2f1ab59
Properly handle colons in XHR header values
9ba714df
Improve Retry-After parsing and docstring
fd6358a8
Revert ternary operator to if statements
46424f55
Reuse resolved Headers for Content-Type parsing
03af59df
Treat empty Content-Type differently from null
8c393e09
Add MatrixError#isRateLimitError
b31179a6
Ignore HTTP status code when getting Retry-After
0c0210a8
Catch Retry-After parsing errors
19b04e42
Add test coverage for HTTP error headers
78aa71f3
Update license years
b48b85b0
Move safe Retry-After lookup to global function
b6a20a3f
Lint
8caf428a
Inline Retry-After header value parsing
e1344c80
Update docstrings
4c4a041f
Use bare catch
bd8dd2d8
Give HTTPError methods for rate-limit checks
e565d5da
Cover undefined errcode in rate-limit check
719fdf38
Update safeGetRetryAfterMs docstring
3e62bf84
Use rate-limit helper functions in more places
9c56d6dd
Group the header tests
91ffc918
richvdh
approved these changes
on 2024-10-30
AndrewFerr
merged
546047a0
into develop 1 year ago
AndrewFerr
deleted the af/error-headers branch 1 year ago
Assignees
No one assigned
Login to write a write a comment.
Login via GitHub