-
Notifications
You must be signed in to change notification settings - Fork 786
getDataFromTree queryErrors just references itself #1812
Comments
This actually happens specifically in the situation when a wrapped component that makes a GraqphQL query contains at least 2 other wrapped components that make GraqphQL queries further down the tree that both throw errors. This might be useful to know if you're trying to work around the issue. |
I think this is fixed in #1978 |
After testing locally, it's not completely fixed in #1978. There's one instance of this which no longer occurs in 2.1.6, but the issue can still happen. 😞 |
Would someone here be able to put together a small runnable reproduction that shows this happening? Thanks! |
@hwillson did you see the new unit test? If you run that unit test on master the last 2 assertions are not satisfied. But if you want I can certainly convert that unit test into an example. (Is there any example repro for another issue I should try to emulate?) |
@anand-sundaram-zocdoc Sorry, I missed the PR link completely (not enough ☕️ yet). No need to worry about the repro - I'll review the PR shortly. Thanks! |
#2133 was merged, so this should be resolved in the next |
Intended outcome:
When using
getDataFromTree()
, query errors should be individually accessibleActual outcome:
When a query throws >1 errors, the error messages are swallowed and the resultant error object just circularly references itself, i.e.,
error.queryErrors === error
Version
The text was updated successfully, but these errors were encountered: