Skip to content

Commit 0b8cb27

Browse files
committed
P5-PR9: callbacks — make unified /webhooks/inbound return 202 via _ack_response (idempotent ACK)
1 parent 283eac9 commit 0b8cb27

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

api/app/main.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4992,7 +4992,8 @@ async def unified_inbound(request: Request, provider: Optional[str] = Query(defa
49924992
audit_event("inbound_received", provider=p, provider_sid=event.get("id"))
49934993
except Exception:
49944994
pass
4995-
return {"ok": True, "provider": p, "event": event}
4995+
# Return 202 Accepted to prevent provider retry storms; event is queued/processed
4996+
return _ack_response({"ok": True, "provider": p})
49964997
# ===== Global error logging =====
49974998
@app.exception_handler(HTTPException)
49984999
async def _handle_http_exc(request: Request, exc: HTTPException):

0 commit comments

Comments
 (0)