Comparing benchling:main...BRIGHT-Automation:main · benchling/app-examples-python
Commits on Mar 14, 2025
-
Update app.py@app.route("/1/webhooks/<path:target>", methods=["POST"])
def receive_webhooks(target: str) -> tuple[str, int]: try: app_def_id = app_definition_id() verify(app_def_id, request.data.decode("utf-8"), request.headers) logger.debug("Received webhook message: %s", request.json) # Dispatch work and ACK webhook as quickly as possible _enqueue_work() # ACK webhook by returning 2xx status code so Benchling knows the app received the signal return "OK", 200 except Exception as e: logger.error(f"Webhook verification failed: {e}") return "Error verifying webhook", 400