Ejemplo n.º 1
0
 def _handle_unexpected_exception(exception: Exception):
     """Handle an unexpected exception."""
     LOGGER.critical("Unexpected exception: %s", exception, exc_info=True)
     response = jsonify(exception_message(exception))
     response.status_code = 500
     return response
Ejemplo n.º 2
0
 def _handle_problem_exception(exception: ProblemException):
     """Render a ProblemException according to ParallelCluster API specs."""
     response = jsonify(exception_message(exception))
     response.status_code = exception.status
     return response
Ejemplo n.º 3
0
 def _handle_parallel_cluster_api_exception(
         exception: ParallelClusterApiException):
     """Render a ParallelClusterApiException according to ParallelCluster API specs."""
     response = jsonify(exception_message(exception))
     response.status_code = exception.code
     return response
Ejemplo n.º 4
0
 def _handle_http_exception(exception: HTTPException):
     """Render a HTTPException according to ParallelCluster API specs."""
     response = jsonify(exception_message(exception))
     response.status_code = exception.code
     return response