Kotlin: Error codes

Supabase Auth can throw or return various errors when using the API. All errors originating from the supabase.auth namespace of the JavaScript client library will be wrapped by the AuthError class.

Error objects are split in a few classes:

Errors originating from the server API classed as AuthApiError always have a code property that can be used to identify the error returned by the server. The status property is also present, encoding the HTTP status code received in the response.

Tips for better error handling