how to fix 500 response code error in Retrofit Android Studio

Viewed 2270

I am facing problem implementing the POST RETROFIT in openrouteservices maps to get round route. Attached photo below is the error log.Enter image description here

This is my API Interface

Call<Round> getRoundCoordinates(
            /*@Header("Content-Type: application/json") String authHeader ,*/
            @Header("Authorization") String authHeader,
            @Query("coordinates") List<List<Double>> coordinates,
            @Query("length") int length,
            @Query("seed") int seed

    );

and 500 Error code is showing. Anyone who can help .Thanks in Advance :)

2 Answers

Error 500 is a server internal error. So either it cannot handle your parameter values or it is totally independent from client-side, the error lays in server code.

From the official document -

The 500 (Internal Server Error) status code indicates that the server encountered an unexpected condition that prevented it from fulfilling the request.

So you need to discuss with you backend team about it because it is an error occurred in the server, not your app (Client-side)

Related