onError is NOT being called when an Error is thrown
See original GitHub issueExpected Behaviour
When an Error is thrown in a resolver onError
passed to useServer should be called.
Actual Behaviour
When an Error is thrown in a resolver onNext
is called, instead of onError
.
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
window.onerror not working in chrome
window.onerror is not triggered when the console directly generates an error. It can be triggered via setTimeout though, e.g., setTimeout(function() ...
Read more >invoke.onError transition not taken when error is thrown #696
onError gets invoked, no error is reported to the console, and I decide what to do with the thrown error. Actual Result.
Read more >Window: error event - Web APIs - MDN Web Docs - Mozilla
The error event is fired on a Window object when a resource failed to load or couldn't be used — for example if...
Read more >Better Error Handling With window.onerror
While window.onerror is an event handler, there is no error event being fired: instead, when there is an uncaught exception or compile-time ...
Read more >Error Handling — The Swift Programming Language ...
A throwing function propagates errors that are thrown inside of it to the scope from which it's called. Note. Only throwing functions can...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I won’t add a
customFormatErrorFn
becausegraphql-ws
does not (and should not) care about the contents of an operation result.Nevertheless, you can format your errors directly in the
onNext
hook as well as theonError
hook, roughly:Okay, thank you @enisdenjo for the quick replies!