class AMAuthErrorCodeResponseStatusMapping {

    public int getAuthLoginExceptionResponseStatus(String authErrorCode) {

        int statusCode = Response.Status.UNAUTHORIZED.getStatusCode();

        Map<String, Response.Status> authErrorCodeResponseStatuses = getAMAuthErrorCodeResponseStatuses();

        Response.Status responseStatus = authErrorCodeResponseStatuses.get(authErrorCode);
        if (responseStatus == null && AMAuthErrorCode.AUTH_TIMEOUT.equals(authErrorCode)) {
            statusCode = 408;
        } else if (responseStatus != null) {
            statusCode = responseStatus.getStatusCode();
        }

        return statusCode;
    }

}