morsdyce / mimic

Seamless client side mocking
https://mimic.js.org
MIT License
395 stars 37 forks source link

XHR errors appear to come from Mimic - confusing (see attachment) #105

Open adamkleingit opened 8 years ago

adamkleingit commented 8 years ago
screen shot 2015-12-17 at 4 50 16 pm
morsdyce commented 8 years ago

What if you open the stack trace? In general xhr stack traces aren't very helpful. You always see the last entry point for the xhr which is usually a xhr library

alexilyaev commented 8 years ago

Is this related to the Hook library we're using?

morsdyce commented 8 years ago

Its related to JavaScript call stack. Hook is one of them.

adamkleingit commented 8 years ago

What I mean is that it looks like there's a problem with BDSM. Maybe we just need to wrap the error message with something that explains that this is the actual result of the XHR

On Thu, Dec 17, 2015 at 11:34 PM, Maayan Glikser notifications@github.com wrote:

Its related to JavaScript call stack. Hook is one of them.

On Thu, Dec 17, 2015, 23:26 Alex Ilyaev notifications@github.com wrote:

Is this related to the Hook library we're using?

— Reply to this email directly or view it on GitHub https://github.com/500tech/bdsm/issues/105#issuecomment-165585845.

— Reply to this email directly or view it on GitHub https://github.com/500tech/bdsm/issues/105#issuecomment-165587145.

morsdyce commented 8 years ago

Oh, I see. I think that's a great idea.

We should investigate this

morsdyce commented 8 years ago

This is a tricky one, in general we should look into capturing the stack trace when the request starts and throw that as the error when the request fails for 1 reason or another