Skip to content

Commit

Permalink
extra exception
Browse files Browse the repository at this point in the history
  • Loading branch information
Trygve Aspenes committed Jan 4, 2025
1 parent 46dea94 commit 55fd8e6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mapgen/modules/get_quicklook.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,9 @@ def get_quicklook(netcdf_path: str,
response_code = '404 Not Found'
response = (f"Unable to access netcdf file {netcdf_path}.")
content_type = 'text/plain'
except Exception as e:
logger.debug(f"Unknown exception {str(e)}")
response_code = '500 Internal Server Error'
response = (f"Unknown server error. Please contact the server administrator.")
content_type = 'text/plain'
return response_code, response, content_type

0 comments on commit 55fd8e6

Please sign in to comment.