ignore error 404 in volley

0

I'm working with the volley in android studio and I have to make a request from the server that returns me a json and a status of server 404

In the browser or postman, the json data is received successfully, but in android, the volley gives me an error


E/Volley: [917] BasicNetwork.performRequest: Unexpected response code 404 for {aqui esta a url}

But this error is sent from the server php, and I can not modify the php by company rules, so is it possible to ignore this error and receive json via android programming?

This error occurs when the server response arrives at 404 along with json so in the android chatch try, it is already going straight to catch.

verification code:

 @Override
            public void onResponse(String respostaWs) {
                System.out.println("Entrei no response >> "+respostaWs);
                try {

                    JSONObject objeto = new JSONObject(respostaWs);
                    retorno.onSuccess(objeto);

                } catch (JSONException e) {

                    System.out.println("Catch : "+e.getMessage());

                }

            }
    
asked by anonymous 24.01.2018 / 18:59

0 answers