Skip to content

Commit

Permalink
Don't crash dev server when a schema loading error occurs
Browse files Browse the repository at this point in the history
  • Loading branch information
ewen-lbh authored Nov 9, 2024
1 parent 7287f24 commit 5a62506
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/houdini/src/lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1173,7 +1173,11 @@ export async function getConfig({

// the schema is safe to load
if (schemaOk && !noSchema) {
_config.schema = await loadSchemaFile(_config.schemaPath)
try {
_config.schema = await loadSchemaFile(_config.schemaPath)
} catch(e) {
console.error(`⚠️ Your schema file could not be loaded: ${e}`)
}
}
}

Expand Down

0 comments on commit 5a62506

Please sign in to comment.