Skip to content

Commit 6a6b702

Browse files
committed
Restore condition to treat 3xx code as errors
1 parent 2c93a54 commit 6a6b702

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/httpClient/httpURLConnectionClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ class HttpURLConnectionClient implements ClientInterface {
208208
}
209209
}
210210

211-
if (res.statusCode && (res.statusCode < 200 || res.statusCode >= 400)) {
211+
if (res.statusCode && (res.statusCode < 200 || res.statusCode >= 300)) {
212212
// API error handling
213213
try {
214214
const formattedData: ApiError | { [key: string]: never } = JSON.parse(response.body);

0 commit comments

Comments
 (0)