-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Errors thrown in interceptors are consumed by the Bridge #12
Comments
Actually, think I just figured out what it was doing. I'm using an interceptor to mock the backend and was using a throw to notify the test that there was an unmapped endpoint in the interceptor, so that the test would fail with the information in question. in errorFn() the
The response being the thrown error, and the "data" being what's returned to the unit test runner. This both obfuscates the error, and will sometimes allow the test to pass (haven't quite figured out why on part 2). This could very well be the intended and expected use case of HttpInterceptors, as I'm pretty green to Angular2. |
The mock is working, so it's apparently not that hard to fix once you dig down far enough. For anyone that has ended up here:
and just populate an array of all the endpoints you've yet to handle for
All normal defensive coding practices around handling breeze responses was sufficient and nothing other than the above had to be done. |
I'm not sure which side of things this is (currently fighting with karma and karma plugins that claim to provide better stack trace info) but I'm currently getting unit test failures of the pattern
Was conflicted about which breeze project this went with, but the highest reference to breeze in this case is the bridge itself, and I'm still trying to figure out what's going on.
reference in question
I don't know if this is a problem with internal error logging, but I'm currently stumped as to figure out what is actually failing, as
LOG: 'breeze error', Error: undefined: undefined
is pretty opaqueThe text was updated successfully, but these errors were encountered: