Skip to content

Commit

Permalink
better logging for getForeignTable
Browse files Browse the repository at this point in the history
  • Loading branch information
lcflight committed Jun 13, 2024
1 parent d03a961 commit 86cd133
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/codegen/makeGetter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ function getForeignTable(field: FieldDefinition, tables: Table[]): Table {
}
const foreignTable = tables.find((t) => field.link_row_table_id === t.id);
if (!foreignTable) {
console.warn("tables", tables);
console.warn("field", field);
throw new Error("foreign table not found");
}
return foreignTable;
Expand Down

0 comments on commit 86cd133

Please sign in to comment.