diff --git a/hooks/ide/use-compile-database.tsx b/hooks/ide/use-compile-database.tsx index 2db3e34..20a21fa 100644 --- a/hooks/ide/use-compile-database.tsx +++ b/hooks/ide/use-compile-database.tsx @@ -45,21 +45,20 @@ export default function useCompileDatabase( const parseKf = async (schema: string) => { const res = await globalThis.parseKuneiform(schema) - // console.log(res) + console.log(res) console.log({ ...res, json: res.json ? JSON.parse(res.json) : res.json }) // TODO: Remove res.json !== "" once we are confident that unhandled errors are cleaned up in KF. - if (!res.json && res.json !== "") { - // if(!res.json) { + // if (!res.json && res.json !== "") { + if(!res.json) { dispatch( setAlert({ type: "error", - text: "Failed to parse database definition.", + text: "A parser error occured. Please check the console.", }), ) - console.log('in failure block') throw new Error(`Failed to parse database definition. Response: ${res.toString()}`) } return JSON.parse(res.json) as IParseRes