morsdyce/mimic

Error response doesn't work with Angular

ArielGueta opened this issue · 3 comments

When working with Angular and mocking an error response it doesn't work. For example:

image

Returns:

image

I debugged the Angular code and saw the issue is in the line :

1

Could you make a small example to reproduce this? This is probably an issue with the requests engine (xhook) which I also maintain, however I need to make sure what exactly the issue is and how it conforms to the XHR spec.

I do know people who used mimic with angular and everything worked correctly so I'll check if they know anything about this.

It only happens when mocking an error. Why xhr.response returns an empty string?