Skip to content

Commit

Permalink
Update server.py
Browse files Browse the repository at this point in the history
It is possible for the cloud event `from_http` method to throw a variety of error messages (which you can't debug because the exception is swallowed by this try/catch or method). 

This should extend a error to the user on why exactly 'No CloudEvent available' is happening.
  • Loading branch information
sferich888 authored and matejvasek committed Feb 9, 2024
1 parent c5e9cd2 commit fd0503b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions parliament/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def handle_post():
request.get_data())
except Exception:
app.logger.warning('No CloudEvent available')
app.logger.exception(traceback.print_exc())
return invoke(func, context)

@app.route("/", methods=["GET"])
Expand Down

0 comments on commit fd0503b

Please sign in to comment.