The CreatorCon Call for Content is officially open! Get started here.

Outbound REST Message returns 500

charliesdev
Giga Expert

I have a hosted REST endpoint that can be successfully hit from:

web:   https://webopstest.osmose.com/MgmtToolsApi/api/Authorization/AuthorizationTokenAsJSON/17/serv_utilii...

fiddle: https://jsfiddle.net/48o0xgxq/2/  

and Postman, iPhone, etc

But testing it using a REST Message object always fails with 500.

I see in my server log (on webopstest) that the endpoint is being hit from servicenow and returns 200.

it's a simple 'get' with no authentication.   should just return a string wrapped in a JSON object.

I'm on Istanbul, build 6 I believe.   Oh, also I'm a n00b, so don't assume that I haven't missed something simple.

1 ACCEPTED SOLUTION

mohamadcharafed
ServiceNow Employee
ServiceNow Employee

Hi Charlie,



It looks like your certificate is using SNI which is not supported until Jakarta


If you have a Jakarta instance set 'glide.outbound.tls_sni.enabled' property to true and test your endpoint and it will work. (this property wont work on instances before jakarta)



Cheers


Mohamad


View solution in original post

29 REPLIES 29

Hi Charlie,



May I know which API is this. When I did a google search on this it came as Open Street Map API.


Is this a correct one.


From where you received the API endpoint.



Regards


Ankur


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

The API is our own.   My team owns webopstest.osmose.com


We have recently changed that endpoint to return JSON instead of a string, then changed it to have a CORS configuration to allow our service-now instance.   Although it doesn't seem like it should need one.


Hi Charlie,



I am also getting http error 500 Internal Server Error when I tried to consume it from this website. Hurl.it - Make HTTP requests


screenshot below.


server-error.JPG



Regards


Ankur


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

Hi Ankur,



try using Postman ,


humphreys.png



I am wondering ! how response is different for different tools.



Thanks


Hi Neeraj,



It is something to do with HTTP connection manager .


Read here.


ServiceNow KB: Outbound Rest Call randomly gives socket error (KB0546961)



Regards


Ankur


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