cal.com icon indicating copy to clipboard operation
cal.com copied to clipboard

[CAL-899] Useless check in handleErrorsJson

Open paolotiu opened this issue 3 years ago • 0 comments

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) ){

CAL-899

paolotiu avatar Jul 28 '22 11:07 paolotiu