code property

String? code
final

The API's machine-readable reason, when it sent one.

The API answers errors with {"message": "<code>"}, using the same constants AuthErrors declares - invalidEmailOrPassword, userBlocked and so on. Reading it here means an application can branch on the reason instead of matching on prose that is free to change.

Implementation

final String? code;