Skip to content

Commit

Permalink
webhook thrown exception improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
mandan2 committed Nov 14, 2023
1 parent 93a2f0b commit 0a388bb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion controllers/front/webhook.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,10 @@ protected function executeWebhook(string $transactionId): void
if (!$cartId) {
// TODO webhook structure will change, no need to create custom exception for one time usage

throw new \Exception('Missing cart_id', 404);
throw new \Exception(
sprintf('Missing Cart ID. Transaction ID: [%s]', $transactionId),
HttpStatusCode::HTTP_NOT_FOUND
);
}

$this->setContext($cartId);
Expand Down

0 comments on commit 0a388bb

Please sign in to comment.