fix: don't fail on non-fatal errors

This commit is contained in:
Nate 2025-09-02 08:50:52 -07:00
parent e37b9b0bce
commit 9d21b67ef3

View file

@ -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;