Hi all,
I don't know what I'm doing wrong of if I don't understand the doc but, I'm using krakend to call an endpoint of my backend, which returns 201 after creating a new resource on POST.
{
"endpoint": "/persons",
"method": "POST",
"output_encoding": "json",
"backend": [
{
"url_pattern": "/rest/v1/persons",
"output_encoding": "json",
"method": "POST",
"extra_config": {
"backend/http": {
"return_error_code": true
}
}
]
}
It's working great for the errors but I'm still getting a 200 back krakend in case of success when the backend responds with 201.
I tried using a LUA script, but AFAIK, as long as I do not use encoding: "no-op", I can't change the status code programatically.
Is my configuration wrong? Is that a bug in KrakenD? Or is it just me not understanding the doc?
Thanks for your help