feat(slice-4): honest delivery failure — send-before-commit + 502 delivery_failed (INV-9; closes #7)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -138,6 +138,11 @@ def create_app(database_url: str | None = None, static_dir: str | Path | None =
|
||||
f"Please wait {exc.retry_after_s}s before requesting another code.",
|
||||
retry_after_s=exc.retry_after_s,
|
||||
)
|
||||
except accounts.DeliveryFailed:
|
||||
return _error(
|
||||
502, "delivery_failed",
|
||||
"We couldn't send the code — try again in a moment.",
|
||||
)
|
||||
return Response(status_code=204)
|
||||
|
||||
@app.post("/api/auth/verify")
|
||||
|
||||
Reference in New Issue
Block a user