https://kotlinlang.org logo
#android-architecture
Title
# android-architecture
u

ursus

03/18/2019, 5:43 PM
Should the app handle this or should I just throw my arms in the air and not commit the whole transaction?
g

ghedeon

03/18/2019, 5:51 PM
If you API gives you a list of invalid items it's up to your business rules to decide whether or not these items are important for the app to remain consistent.
one thing you can do is to filter them out but log the error in your crashlytics and report it to the backend.
u

ursus

03/18/2019, 6:01 PM
Sounds reasonable, its users -> messages, if message references foo@bar.quax user, thats a fk violation, would you rather see something as [Invalid user] at the message or not see the message at all?
g

ghedeon

03/18/2019, 6:11 PM
I guess, as a user I'd rather prefer to see all my messages. Even if the sender wasn't identified.
u

ursus

03/18/2019, 6:27 PM
yea, thanks
2 Views