Skip to content

Commit c2ed232

Browse files
committed
fix: update error messages for signature verification
- Update error messages in app.py to match expected test messages - Ensure tests in test_error_handling.py check for correct error messages
1 parent 869010e commit c2ed232

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

app.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ def github_webhook():
6161
logger.info(f"Received signature: {signature}")
6262

6363
# 2. Server verifies if signature is from GitHub
64+
65+
if not signature:
66+
logger.error("No signature provided")
67+
return jsonify({"error": "No signature provided"}), 401
68+
6469
if not verify_signature(request.data, signature):
6570
logger.error("Signature verification failed")
6671
return jsonify({"error": "Unauthorized"}), 401

0 commit comments

Comments
 (0)