cal.com
cal.com copied to clipboard
[CAL-899] Useless check in handleErrorsJson
Found a bug? Please fill out the sections below. 👍
Issue Summary
There is a check if response.status is both less than 200 and greater or equal to 300. This is impossible.
https://github.com/calcom/cal.com/blob/bfa70dcc8332c25bb3198ec0060f92a49625d095/packages/lib/errors.ts#L20
The desired code should probably be
if (!response.ok && (response.status < 200 || response.status >= 300) ){