Skip to content

Commit

Permalink
feat(picqer): dont handle hook when ordercode is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnvdbrug committed Jul 31, 2023
1 parent 2cf05eb commit 7d86fd6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
13 changes: 3 additions & 10 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
name: Publish packages

on:
workflow_dispatch:
inputs:
version:
type: choice
description: What version do you want to publish?
required: true
options:
- patch
- minor
- major
push:
branches:
- main

jobs:
Publish:
Expand Down
6 changes: 5 additions & 1 deletion packages/vendure-plugin-picqer/src/api/picqer.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,11 @@ export class PicqerService implements OnApplicationBootstrap {
'lines.productVariant',
]);
if (!order) {
throw new Error(`No order found for code ${data.reference}`);
Logger.error(
`No order found for code ${data.reference}. Not processing this hook any further`,
loggerCtx
);
return;
}
const orderLinesToFulfill: OrderLineInput[] = [];
data.products.forEach((pickListProduct) => {
Expand Down

0 comments on commit 7d86fd6

Please sign in to comment.