Refactor CC API async route handlers (#4885)

* Improve error handling in CC /status and /generate endpoints

* Cancel pending status check on switching CC source
This commit is contained in:
Cohee
2025-12-11 23:31:46 +02:00
committed by GitHub
parent 10a2f0f740
commit 9046fe8d2d
3 changed files with 556 additions and 574 deletions
+1 -1
View File
@@ -744,7 +744,7 @@ function initStandaloneMode() {
}
}
function cancelStatusCheck(reason = 'Manually cancelled status check') {
export function cancelStatusCheck(reason = 'Manually cancelled status check') {
abortStatusCheck?.abort(new AbortReason(reason));
abortStatusCheck = new AbortController();
setOnlineStatus('no_connection');