Skip to content

Commit

Permalink
Merge pull request #42 from narthur/better-logging
Browse files Browse the repository at this point in the history
better logging for getForeignTable
  • Loading branch information
narthur committed Jun 13, 2024
2 parents d03a961 + 86cd133 commit 02a3a73
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 02a3a73

Please sign in to comment.