Android。未找到 "JSONObject[\" 响应\"]。"何时提出改造要求

Android. get "JSONObject[\"response\"] not found." when make request with retrofit

当我尝试在我的 android 应用程序中提出改造请求时出现错误。 我收到 500 间隔服务器错误

"title":"Internal Server Error","status":500,"detail":"JSONObject[\"response\"] not found.","path":"/api/profiles/help/45.13367991428822/33.5960291326046","message":"error.http.500"

这是我的代码:

 IApiService service = RetrofitInstance.getRetrofitAuthInstance().create(IApiService.class);
        Call<ArrayList<Profile>> call = service.sendHelp(v1, v2);
        call.enqueue(new Callback<ArrayList<Profile>>() {
            @Override
            public void onResponse(Call<ArrayList<Profile>> call, Response<ArrayList<Profile>> response) {
                Toast.makeText(getBaseContext(), String.valueOf(response.code()), Toast.LENGTH_LONG).show();
            }

            @Override
            public void onFailure(Call<ArrayList<Profile>> call, Throwable t) {
                Toast.makeText(getBaseContext(), t.getMessage(), Toast.LENGTH_LONG).show();

            }
        });

我的界面:

 @GET(Urls.SEND_HELP)
    Call<ArrayList<Profile>> sendHelp(@Path("latitude") String latitude,
                                      @Path("longitude") String longitude);

请帮帮我。

显然问题出在服务器端的对象序列化上。 状态代码 5xx 代表服务器上发生的错误。 您无法使用 Retrofit 客户端修复它。