fix: return retryable event stream upstream failures (#67)
This commit is contained in:
1 parent
069d8979fb
commit
19da7f47df
2 files changed
+26
No files matched your search
+10
@@ -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))
|
||||
)
|
||||
},
|
||||
)
|
||||
Reference in new issue
Block a user