Skip to content

Commit 301141d

Browse files
authored
fix: Fix typo in header name (getsentry#657)
1 parent 4434636 commit 301141d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

sentry_sdk/transport.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def _update_rate_limits(self, response):
147147

148148
# new sentries with more rate limit insights. We honor this header
149149
# no matter of the status code to update our internal rate limits.
150-
header = response.headers.get("x-sentry-rate-limit")
150+
header = response.headers.get("x-sentry-rate-limits")
151151
if header:
152152
self._disabled_until.update(_parse_rate_limits(header))
153153

tests/test_transport.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def test_data_category_limits(httpserver, capsys, caplog, response_code):
137137
httpserver.serve_content(
138138
"hm",
139139
response_code,
140-
headers={"X-Sentry-Rate-Limit": "4711:transaction:organization"},
140+
headers={"X-Sentry-Rate-Limits": "4711:transaction:organization"},
141141
)
142142

143143
client.capture_event({"type": "transaction"})
@@ -168,7 +168,7 @@ def test_complex_limits_without_data_category(
168168
dict(dsn="http://foobar@{}/123".format(httpserver.url[len("http://") :]))
169169
)
170170
httpserver.serve_content(
171-
"hm", response_code, headers={"X-Sentry-Rate-Limit": "4711::organization"},
171+
"hm", response_code, headers={"X-Sentry-Rate-Limits": "4711::organization"},
172172
)
173173

174174
client.capture_event({"type": "transaction"})

0 commit comments

Comments
 (0)