500 Internal Server Error in Unity

I am using OpenRouteService using OnlineMaps Asset in Unity. At this point, the HTTP/1.1 500 Internal Server Error error appears as a response to the OnRequestCompletion function in the picture, how can I fix it? On the OpenRouteService homepage, the Call Action is executed without any problems with the same api key, latitude, longitude, and set value.

url is well-generated with https://api.openrouteservice.org/v2/directions/footWalking


Hi @YujinHa,

could you try to set the headers like this:

{'Content-Type': 'application/json; charset=utf-8'}
{'Accept': 'application/json, application/geo+json, application/gpx+xml, img/png; charset=utf-8'}
{'Authorization': 'your key'}

if that isn’t working try could you inspect the whole response object.
normally with a http 500 there should also be an additional internal error code with message

Best regards

Thank you for your answer.
There was a problem with the transformation.
I contacted OnlineMaps that I used and received the modified code and solved it.

Hi @YujinHa,

Great that you solved it :muscle:

Would you mind putting your solution here as answer to your post for people encountering the same problem? :slight_smile:

Best regards

This wasn’t an OPS error, but I share a solution for people facing the same problem. :blush:
In the GetEnumDescription() of the OnlineMapsReflectionHelper code of OnlineMaps asset, I modified one line as shown in the following picture.

1 Like