1

I was using Spring Cloud Functions with azure...but could not figure out how using Spring cloud function I can send a custom HTTP code back in response.... as we can do in ResponseEntityAs of now I do not see a way of doing that. let's say after validation I want to throw a 400 BAD REQUEST error in the response or add some specific parameter in the response header, how do I do that.

Oleg Zhurakousky
  • 5,820
  • 16
  • 17
  • At the moment we provide a delegation model for Azure functions. There seem to be a lot of error handling [scenarios and approaches](https://hackernoon.com/reliable-event-processing-in-azure-functions-37054dc2d0fc) that you can benefit from natively in Azure – Oleg Zhurakousky Aug 13 '19 at 05:08
  • Also, as described in [this reference](https://learn.microsoft.com/en-us/azure/azure-functions/functions-reference-java) you can define your function as `@FunctionName("myFunction") public HttpResponseMessage myFunction(..)` effectively giving you full control over HttpResponse. – Oleg Zhurakousky Aug 13 '19 at 08:05

0 Answers0