Skip to content

Commit

Permalink
Improve /track/sale
Browse files Browse the repository at this point in the history
  • Loading branch information
steven-tey committed Jan 16, 2025
1 parent 5f47aa4 commit 6d796d6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions apps/web/app/api/track/sale/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ export const POST = withWorkspaceEdge(
});

if (!customer) {
// instead of throwing an error, maybe we should return a 304 status code
// and say that the customer was not found, so sale was not tracked?
throw new DubApiError({
code: "not_found",
message: `Customer not found for externalId: ${customerExternalId}`,
Expand Down

0 comments on commit 6d796d6

Please sign in to comment.