-1

I'm trying to post some data through service now but getting 500. Header used : Accept:application/json Content-Type:application/json

What can be the reason behind 500?

When i tried to do the same thing using Rest client, I am getting 200 status code.

code98355
  • 21
  • 1
  • 6

1 Answers1

1

I'm not sure if this applies to ServiceNow, but I've seen 500 errors before due to the user input being invalid, and there not being validation done on the server to ensure it's valid. When the application goes to put it into the database, it doesn't fit, and thus it generates the 500 server error.

If you haven't already, triple-check the user input you're POSTing to the server and confirm it's validity. Try something simple. Try creating the record through the web interface, looking at the POST request that your browser sends, and replicating the data that it sends in your own POST request.

Hope this helps,

Dylan

Dylan Lindgren
  • 361
  • 2
  • 3