Question
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689986000/6a112eda-6a2c-42b9-b5e8-212f72e0eb20.png?itok=mJpsr7qo)
April Technologie
FR
Last activity: 20 Oct 2022 11:49 EDT
HTTP 500 instead of 400 in service PEGA when the calling don't respect the constraints
Hi,
I developed a service PEGA which use an Automation. The automation provide me to specify the constraints concerning my query string.
For instance, I parameterized the automation to say that the query string TableName have to be equal to "Motif" or "SousMotif" and not other value. And the query string ID have to be mandatory.
If I try to call the service without ID ou with a TableName different of "Motif" or "SousMotif", PEGA return an HTTP 500.
It is my problem. PEGA should return an HTTP 400 in this case because it is just a problem of bad request and not a problem technical. FOR in the log PEGA, PEGA generate an exception which return an HTTP 500.
Do you have any suggestion about this because I don't find any option to personalized the http code returned in this case
Thank you
***Edited by Moderator Marije to add Capability tags***