guard against missing shipping invoice
This commit is contained in:
@@ -250,6 +250,10 @@ export class OrderService {
|
|||||||
amountFiat: deliveryCost
|
amountFiat: deliveryCost
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (!shippingInvoice) {
|
||||||
|
throw new InternalServerErrorException('Failed to issue shipping invoice');
|
||||||
|
}
|
||||||
|
|
||||||
await this.orderRepo.update(orderId, {
|
await this.orderRepo.update(orderId, {
|
||||||
shippingInvoice: { id: shippingInvoice.id },
|
shippingInvoice: { id: shippingInvoice.id },
|
||||||
quotedAt
|
quotedAt
|
||||||
|
|||||||
Reference in New Issue
Block a user