constoriginalFetch=window.fetchwindow.fetch=async(...args)=>{// intercept requestconstres=originalFetch(...args)// intercept response e.gif(res.ok){returnres.json()}else//Do whatever you want to handle the error}}
That's a terrible advice
Some comments have been hidden by the post's author - find out more
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Never do this
That's a terrible advice