From 5c5f7439544ef885416b5170b4a12d12d35027a9 Mon Sep 17 00:00:00 2001 From: Shreyas Gopalakrishna Date: Wed, 26 Oct 2022 16:20:45 -0500 Subject: [PATCH 1/2] Updated DurableClientContext.createCheckStatusResponse to return 202 --- .../durabletask/azurefunctions/DurableClientContext.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azurefunctions/src/main/java/com/microsoft/durabletask/azurefunctions/DurableClientContext.java b/azurefunctions/src/main/java/com/microsoft/durabletask/azurefunctions/DurableClientContext.java index d8cbc04c..e9515dd0 100644 --- a/azurefunctions/src/main/java/com/microsoft/durabletask/azurefunctions/DurableClientContext.java +++ b/azurefunctions/src/main/java/com/microsoft/durabletask/azurefunctions/DurableClientContext.java @@ -70,8 +70,8 @@ public HttpResponseMessage createCheckStatusResponse(HttpRequestMessage reque String instanceStatusURL = baseUrl + "/runtime/webhooks/durabletask/instances/" + encodedInstanceId; - // Construct the response as an HTTP 201 with a JSON object payload - return request.createResponseBuilder(HttpStatus.CREATED) + // Construct the response as an HTTP 202 with a JSON object payload + return request.createResponseBuilder(HttpStatus.ACCEPTED) .header("Location", instanceStatusURL + "?" + this.requiredQueryStringParameters) .header("Content-Type", "application/json") .body(new HttpCreateCheckStatusResponse( From 11204876bba0ce5d20f1f4fb7826d0db45960ddc Mon Sep 17 00:00:00 2001 From: Shreyas Gopalakrishna Date: Wed, 26 Oct 2022 16:27:28 -0500 Subject: [PATCH 2/2] Updated CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 802c4064..59da0235 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,5 +16,6 @@ ### Breaking changes * Use java worker middleware to avoid wrapper method when create orchestrator function ([#87](https://github.com/microsoft/durabletask-java/pull/87)) +* Fixed DurableClientContext.createCheckStatusResponse to return 202 ([#92](https://github.com/microsoft/durabletask-java/pull/92)) * to be updated \ No newline at end of file