how to create an javascript interceptor, that intercept every xmlHttpRequest, and show an alert each time the xmlHttpRequest goes in error or errorCode is != 200?
Howdy! I would create a custom function that wraps fetch. On the response check the status code. If it is not resp.ok you could do the alert! Whenever you make an API call use this custom function.
thanks man!
❤
how to create an javascript interceptor, that intercept every xmlHttpRequest, and show an alert each time the xmlHttpRequest goes in error or errorCode is != 200?
Howdy! I would create a custom function that wraps fetch. On the response check the status code. If it is not resp.ok you could do the alert! Whenever you make an API call use this custom function.
thanks bud
Jackson Susan Moore Joseph Garcia Sharon
👋