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 not reported in some circumstances #30
Comments
I see what's happening, but not sure yet how to handle. In versions of React before 18, it is sometimes permitted to return This is also reflected in the current docs: https://reactjs.org/docs/jsx-in-depth.html#booleans-null-and-undefined-are-ignored) I'm testing with React 17 and I can make React happy with a div: So it's OK for div's to have undefined So there's still an error raised. Why isn't it getting reported? When there is no error, ErrorBoundary returns the value of The error is then raised after Solution? But that won't be the correct behavior for future React versions, and I'm not convinced it's the correct behavior for past versions either. @mudetroit Thoughts? |
@waltjones okay this sounds like an edge case than. We stumbled across it because we had an error not getting tracked and we were confused as to why. In our case, I am pretty sure we can safely update to React v18. But I think the best thing here might be to put a note in the documentation here with this being a possible issue that people could run into. |
This has been submitted to readme.io. |
Description
When using the ErrorBoundary there are errors reported to the console which do not seem to be reported to Rollbar properly.
Steps to recreate
@rollbar/react
androllbar
Note now that the error caused by trying to render undefined appears in the console, but does not appear in the rollbar project
The text was updated successfully, but these errors were encountered: