HttpErrorData.parse constructor
Parse a JSON error response to an instance of HttpErrorData.
Throws a TypeError if raw
is not a valid error response.
Implementation
HttpErrorData.parse(Map<String, Object?> raw)
: errorCode = raw['code'] as int,
errorMessage = raw['message'] as String {
final errors = raw['errors'] as Map<String, Object?>?;
if (errors != null) {
_initErrors(errors);
}
}