realm / realm-java

Realm is a mobile database: a replacement for SQLite & ORMs
http://realm.io
Apache License 2.0
11.45k stars 1.75k forks source link

Integrate new core exception unification PR #7760

Closed clementetb closed 1 year ago

clementetb commented 1 year ago

Integrates the https://github.com/realm/realm-core/pull/5441, a refactor that unifies the way the errors are surfaced to the SDKs so they can be easily consumed.

We have not made any changes to the SDK error architecture to keep the breaking changes to a minimum. There are some required breaking changes:

Removed error categories

AUTH
CONNECTION
DEPRECATED
MISC

New error categories

APP
CLIENT
SYSTEM

Removed error codes

NO_MATCHING_RULE_FOUND
SERVICE_INTERNAL_SERVER_ERROR
INVALID_EMAIL_PASSWORD

SERVICE_NONE

MISC_END_OF_INPUT
MISC_PREMATURE_END_OF_INPUT
MISC_DELIMITER_NOT_FOUND

New error codes

CLIENT_USER_NOT_FOUND
CLIENT_USER_NOT_LOGGED_IN
CLIENT_APP_DEALLOCATED
CLIENT_REDIRECT_ERROR
CLIENT_TOO_MANY_REDIRECTS
BAD_TOKEN
MALFORMED_JSON
MISSING_JSON_KEY
BAD_BSON_PARSE
MISSING_AUTH_REQ
NO_MATCHING_RULE
SERVER_ERROR
INVALID_PASSWORD
SCHEMA_VALIDATION_FAILED_WRITE
APP_UNKNOWN
MAINTENANCE_IN_PROGRESS

closes https://github.com/realm/realm-java/pull/7746 closes https://github.com/realm/realm-java/issues/7638

cmelchior commented 1 year ago

https://github.com/realm/realm-core/pull/5441 has been merged unblocking this