Expose the internally used util.createAxiosError and provide instance wrappers for common errors such as timeout, networkerror, etc., so that various generic errors can be returned by the custom reply method.
Motivation: I want to test our internal xx-retry library, and it is necessary to REPLY at the mock level to count the actual number of backend calls. But the current reply needs to write a lot of template code to construct the timeout correctly and test the count
Expose the internally used
util.createAxiosError
and provide instance wrappers for common errors such as timeout, networkerror, etc., so that various generic errors can be returned by the custom reply method.Motivation: I want to test our internal
xx-retry
library, and it is necessary to REPLY at the mock level to count the actual number of backend calls. But the current reply needs to write a lot of template code to construct the timeout correctly and test the count