Both xhr.onerror and xhr.ontimeout throw the same error.
I think it would be beneficial to have both handler emit errors with a different message. This way, applications can behave differently based on the error message. Especially since there is no such thing as a unique error code do distinguish both errors.
Both
xhr.onerror
andxhr.ontimeout
throw the same error.I think it would be beneficial to have both handler emit errors with a different message. This way, applications can behave differently based on the error message. Especially since there is no such thing as a unique error code do distinguish both errors.