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 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(