Response code, error messages

sandeep3791
Tera Contributor

Hi,

We have exposed scripted Rest API for Create operation. We are using import set table as target to parse the JSON request message and then transform maps to push data to target table.

We have data policies running on CMDB target table to validate mandatory fields. On table level i am getting correct client side error messages to tell me that particular field or fields are mandatory.

how do I send these type or error messages to requesting system as HTTP response.

Thanks,

Sandeep

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Sandeep,

If 3rd party team is sending request without mandatory fields then are they not getting error due to data policies.

Regards

Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hi Ankur,

 

We are trying to hit the URL from postman for now, and there it only gives status 200 OK as its a scripted API and the script is being executed properly to get the data to import set table.

Thanks,

Sandeep