mirror of
https://github.com/esengine/DeepSeek-Reasonix.git
synced 2026-11-07 10:45:59 -10:00
fix(feedback): show the response origin and body snippet when the worker refuses the sync token
This commit is contained in:
1 parent
6d9266fc8e
commit
c116fd76ec
1 file changed
+5
-1
@@ -304,7 +304,11 @@ export function liveDeps(env) {
|
||||
} catch (err) {
|
||||
throw new Error(`${method} ${path} unreachable: ${err.cause?.code ?? err.message}`);
|
||||
}
|
||||
if (res.status === 401 || res.status === 403) throw new FatalError(`${method} ${path} -> ${res.status} (check FEEDBACK_ADMIN_TOKEN)`);
|
||||
if (res.status === 401 || res.status === 403) {
|
||||
const ray = res.headers.get("cf-ray") ?? "-";
|
||||
const snippet = (await res.text().catch(() => "")).replace(/\s+/g, " ").slice(0, 160);
|
||||
throw new FatalError(`${method} ${path} -> ${res.status} (check FEEDBACK_ADMIN_TOKEN) cf-ray=${ray} body=${snippet}`);
|
||||
}
|
||||
if (!res.ok) throw new Error(`${method} ${path} -> ${res.status}`);
|
||||
return res.status === 204 ? null : res.json().catch(() => null);
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user