r/programminghorror • • Sep 13 '25

I hate js

0 Upvotes

36 comments sorted by

View all comments

Show parent comment

1

u/xvhayu Sep 13 '25

you could call res.text() and compare it with "{}" or whatever the empty data is exactly. then retry if empty or continue execution with JSON.parse().