ground-android icon indicating copy to clipboard operation
ground-android copied to clipboard

[Code health] Clean up `ApplicationErrorManager`

Open gino-m opened this issue 4 years ago • 0 comments

Some quick wins:

  • Inject and use EphemeralPopups directly instead of binding to Activity.
  • How errors are handled depends on the use case; expose finer-grained handlers, e.g. handlePermissionDeniedErrors.
  • Permission denied may also occur due other Firebase rules besides passlist, e.g. to lack of ACLs in project. Error message should be more general (e.g., "Permission denied").
  • Consider letting handlePermissionDeniedErrors returns a lambda to simplify Rx syntax or use Rx compose(), remove shouldInterceptException().
  • Tests currently look for specific strings copy & pasted from resources. We should avoid change detector tests - motivation: https://testing.googleblog.com/2015/01/testing-on-toilet-change-detector-tests.html

@shobhitagarwal1612 Would you like to look into these?

gino-m avatar Nov 23 '21 17:11 gino-m