Skip to content

Commit 64151c1

Browse files
authored
Merge pull request #6097 from continuedev/pe/error-text-fix
feat: improve fatal error message
2 parents eb089af + 1d77ad3 commit 64151c1

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

core/config/yaml/loadYaml.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -153,13 +153,8 @@ async function loadConfigYaml(options: {
153153
}
154154
}
155155

156-
if (config) {
157-
isAssistantUnrolledNonNullable(config)
158-
? errors.push(...validateConfigYaml(config))
159-
: errors.push({
160-
fatal: true,
161-
message: "Assistant includes blocks that don't exist",
162-
});
156+
if (config && isAssistantUnrolledNonNullable(config)) {
157+
errors.push(...validateConfigYaml(config));
163158
}
164159

165160
if (errors?.some((error) => error.fatal)) {
@@ -223,7 +218,8 @@ async function configYamlToContinueConfig(options: {
223218
config: continueConfig,
224219
errors: [
225220
{
226-
message: "Found missing blocks in config.yaml",
221+
message:
222+
"Failed to load config due to missing blocks, see which blocks are missing below",
227223
fatal: true,
228224
},
229225
],

0 commit comments

Comments
 (0)