diff --git a/src/datasources/order-api.ts b/src/datasources/order-api.ts index fdde226..fb5e015 100644 --- a/src/datasources/order-api.ts +++ b/src/datasources/order-api.ts @@ -118,7 +118,9 @@ export class OrderAPI extends BaseSQLDataSource { .orderBy('id') .first() .cache(MINUTE) - .then((row) => this.createOrderFromRow(row)); + .then((row) => { + return row ? this.createOrderFromRow(row) : null; + }); } async getOrderRowFieldMapping(): Promise {