spring-cloud / spring-cloud-function

Apache License 2.0
1.04k stars 618 forks source link

spring-cloud-function-adapter-azure-web always returns 200 #1126

Open cpiment opened 7 months ago

cpiment commented 7 months ago

Describe the bug The Azure Web Adapter always returns response code 200, even if the method it calls from the Spring Web application returns any other response code.

Also I have detected that if you call a path that doesn't exist in the underlying Controllers, you also get a 200 response code and no errors in logs.

Sample https://github.com/spring-cloud/spring-cloud-function/blob/118c223be1de0f3429942bedb592e714d0ea14c0/spring-cloud-function-adapters/spring-cloud-function-adapter-azure-web/src/main/java/org/springframework/cloud/function/adapter/azure/web/AzureWebProxyInvoker.java#L130

Response code should be built using the response code from the underlying httpResponse, the same way the response body and response headers are generated.

mixaverros88 commented 3 months ago

Also I faced the same issue. The response status should be 400.

Screenshot_15

github-actions[bot] commented 2 weeks ago

This issue has been stale for over 60 days

cpiment commented 2 weeks ago

There are several issues regarding the Azure Function Adapter which have gone stale.