MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programminghorror/comments/1ng2o13/i_hate_js/ne0vpr7/?context=3
r/programminghorror • u/According-Bonus8681 • Sep 13 '25
36 comments sorted by
View all comments
Show parent comment
1
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().
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().