getErrorState method
Implementation
ErrorStatus getErrorState(int? statusCode) {
if (validationError.contains(statusCode)) {
return ErrorStatus.validationError;
} else if (authorizationError.contains(statusCode)) {
return ErrorStatus.authorizationError;
} else if (authenticationError.contains(statusCode)) {
return ErrorStatus.authenticationError;
} else if (resourceNotFoundError.contains(statusCode)) {
return ErrorStatus.resourceNotFoundError;
}
return ErrorStatus.unknownError;
}