case 404:
throw new NotFoundException(href);
case 405:
throw new MethodNotAllowedException(result, href);
case 409:
throw new ConflictException(href);
default:
throw new GenericHttpException(result, href);
}
} else if (result >= 500 && result < 600) {
throw new InternalServerError(href, result);