Skip to content

Commit

Permalink
Add 404 handler.
Browse files Browse the repository at this point in the history
  • Loading branch information
ktlim committed Apr 30, 2024
1 parent 7461a7c commit 5f523f9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions python/lsst/consdb/pqserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ def handle_bad_value(e: BadValueException):
return jsonify(e.to_dict()), e.status_code


@app.errorhandler(werkzeug.exceptions.NotFound)
def handle_not_found(e):
logger.error(e)
return f"not found: {e}", 404

###################################
# Web service application methods #
###################################
Expand Down

0 comments on commit 5f523f9

Please sign in to comment.