fix: don't fail on non-fatal errors
This commit is contained in:
parent
e37b9b0bce
commit
9d21b67ef3
1 changed files with 3 additions and 2 deletions
|
|
@ -373,8 +373,9 @@ async function loadAssistantSlug(
|
|||
});
|
||||
|
||||
const result = resp.configResult;
|
||||
if (result.errors?.length || !result.config) {
|
||||
throw new Error(result.errors?.join("\n") ?? "Failed to load assistant.");
|
||||
const errors = result.errors;
|
||||
if (errors?.some((e: any) => e.fatal)) {
|
||||
throw new Error(errors.map((e: any) => e.message).join("\n") ?? "Failed to load assistant.");
|
||||
}
|
||||
|
||||
return result.config as AssistantUnrolled;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue