case 403:
return new AccessDeniedException(responseCode, msgError);
case 404:
return new ResourceNotFoundException(responseCode, msgError);
case 422:
return new UnprocessableEntityException(responseCode, msgError);
case 500:
return new InternalServerErrorException(responseCode, msgError);
}
return new RestException(responseCode, msgError);
}