You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a nullable field is marked @nonnull locally, it of course can still be returned as null by the backend. In particular this can happen in case of partial errors.
When that happens, a JsonDataException will be thrown at JSON reading time, in the Adapter's fromJson method.
If we consider that this will probably happen in typical uses, this may be considered surprising to users.
Maybe it's only a matter of adding a warning in the documentation.
Or we could investigate a way to throw something less "low level" and more descriptive
The text was updated successfully, but these errors were encountered:
Implementation wise, we could have a FailSafeAdapter(wrappedAdapter) that wraps another Adapter and catches errors to propagate them up the tree to the next nullable field. From that other issue, looks like error handling will be the difficult thing but certainly sounds doable.
When a nullable field is marked
@nonnull
locally, it of course can still be returned asnull
by the backend. In particular this can happen in case of partial errors.When that happens, a
JsonDataException
will be thrown at JSON reading time, in the Adapter'sfromJson
method.If we consider that this will probably happen in typical uses, this may be considered surprising to users.
The text was updated successfully, but these errors were encountered: