API Service endpoint to return a specific HTTP status code
daniel_adornes
Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Core Concepts, Dataiku DSS Adv Designer, Registered Posts: 30 ✭✭✭✭✭
Hello everyone!
When implementing a plain Python endpoint in an API Service, is there a way for me to define which HTTP status code I want to return? Like, instead of raising an error and sending back a status code 500, I want to raise a 400 code, so our consumers know that they have sent something wrong as input.
Thank you!
Best Answer
-
daniel_adornes Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Core Concepts, Dataiku DSS Adv Designer, Registered Posts: 30 ✭✭✭✭✭
Unfortunately, the information we got from Dataiku's support is that this currently isn't a possibility, but that a suggestion was sent to DSS's development team.
Thank you all