Skip to content

Commit

Permalink
Added hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Blake authored and Blake committed Feb 7, 2024
1 parent 318ccf6 commit f32c126
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def handle_webhook():
logging.error("No data received in request")
return make_response(jsonify({"error": "No data received"}), 400)

data = data['data']
if data.get('toStageId') != os.getenv('VideoStageId'):
logging.error("Invalid credentials submitted in request.")
return make_response(jsonify({"error": "Invalid credentials submitted."}), 403)
Expand Down Expand Up @@ -118,7 +119,7 @@ def handle_webhook():
# Assuming post_candidate_analysis_to_lever returns None on failure
logging.error(f"Failed to send results to Lever for opportunityId {opportunity_id}")
return make_response(jsonify({"error": "Failed to send results to Lever"}), 500)

print('done')
return jsonify(analysis_result), 200
except Exception as e:
logging.error(f"An unexpected error occurred: {e}")
Expand Down

0 comments on commit f32c126

Please sign in to comment.