fix: return retryable event stream upstream failures (#67)
CI / lint (pull_request) Successful in 8s
CI / build-frontend (pull_request) Successful in 4s

This commit is contained in:
timmy committed 2026-08-06 03:17:40 +00:00
1 parent 069d8979fb
commit 19da7f47df
2 files changed
+26

No files matched your search

+10
View File
@@ -124,3 +124,13 @@ async def event_stream():
)
},
)
except Exception:
return JSONResponse(
{"error": "Gitea event stream is temporarily unavailable"},
status_code=503,
headers={
"Retry-After": str(
max(1, math.ceil(EVENT_STREAM_TIMEOUT_SECONDS))
)
},
)