Skip to content
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

Suppress StoreWriter errors for missing fields with read functions #8710

Merged

Conversation

benjamn
Copy link
Member

@benjamn benjamn commented Aug 26, 2021

PR #8416 converted these missing field errors from thrown exceptions to invariant.error log messages, so the whole write no longer fails when one field is missing. Uninhibited by the drawbacks of throwing, PR #8416 also allowed these errors to be logged in many more (legitimate) cases than before.

To reduce console noise, we should consider hiding errors that are not urgent. One case of non-urgency is when the field in question has a read function in its field policy, which means the field could have a default or synthetic/computed value, so it's not necessarily a mistake to omit the field from the written data. Errors for fields with(in) @client directives are hidden as well (that's what context.clientOnly means), and this seems like a similar situation.

@benjamn benjamn force-pushed the suppress-StoreWriter-errors-for-readable-fields branch from f85c6d6 to dafda8f Compare August 26, 2021 22:41
Copy link
Member

@hwillson hwillson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense and looks good, thanks @benjamn!

@benjamn benjamn merged commit 52f1e79 into release-3.5 Aug 27, 2021
@benjamn benjamn deleted the suppress-StoreWriter-errors-for-readable-fields branch August 27, 2021 13:16
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants