fix: team leader エラーメッセージが空になるバグを修正
error と content が共に空の場合、status をフォールバックとして使用する。 ?? 演算子は空文字をフォールバックしないため || に変更。
This commit is contained in:
parent
1a890792f1
commit
52968ac873
@ -296,7 +296,7 @@ export async function decomposeTask(
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (response.status !== 'done') {
|
if (response.status !== 'done') {
|
||||||
const detail = response.error ?? response.content;
|
const detail = response.error || response.content || response.status;
|
||||||
throw new Error(`Team leader failed: ${detail}`);
|
throw new Error(`Team leader failed: ${detail}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -336,7 +336,7 @@ export async function requestMoreParts(
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (response.status !== 'done') {
|
if (response.status !== 'done') {
|
||||||
const detail = response.error ?? response.content;
|
const detail = response.error || response.content || response.status;
|
||||||
throw new Error(`Team leader feedback failed: ${detail}`);
|
throw new Error(`Team leader feedback failed: ${detail}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user