Skip to content

Commit

Permalink
Return 202 Accepted
Browse files Browse the repository at this point in the history
  • Loading branch information
gcatanese authored Mar 12, 2024
1 parent cde3906 commit fd70db3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions giftcard-example/Controllers/WebhookController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ public async Task<ActionResult<string>> Webhooks(NotificationRequest notificatio

await ProcessOrderClosedNotificationAsync(container.NotificationItem);

return Ok("[accepted]");
// Return a 202 status with an empty response body
return Accepted();
}
catch (Exception e)
{
Expand Down Expand Up @@ -189,4 +190,4 @@ private Task ProcessOrderClosedNotificationAsync(NotificationRequestItem notific
return Task.CompletedTask;
}
}
}
}

0 comments on commit fd70db3

Please sign in to comment.