Skip to content

Commit

Permalink
Merge pull request #99 from metno/add_exception
Browse files Browse the repository at this point in the history
extra exception
  • Loading branch information
TAlonglong authored Jan 4, 2025
2 parents 46dea94 + 55fd8e6 commit 069cb0e
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 069cb0e

Please sign in to comment.