Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onError callback response body null #96

Open
UngureanEugen opened this issue May 18, 2015 · 0 comments
Open

onError callback response body null #96

UngureanEugen opened this issue May 18, 2015 · 0 comments
Labels
Milestone

Comments

@UngureanEugen
Copy link

Hi,
this is my request log :

Wasp﹕ ---> REQUEST GET http://myserver.com/api/Get
Wasp﹕ Header - [basic: test]
Wasp﹕ Body - no body
Wasp﹕ ---> END
Wasp﹕ ---> REQUEST GET http://myserver.com/api/Get
Wasp﹕ Header - [Accept-Encoding: gzip]
Wasp﹕ Header - [basic: test]
Wasp﹕ Header - [Connection: Keep-Alive]
Wasp﹕ Header - [Host: myserver.com]
Wasp﹕ Header - [User-Agent: okhttp/2.2.0]
Wasp﹕ Body - no body
Wasp﹕ ---> END
Wasp﹕ <--- RESPONSE 401 http://myserver.com/api/Get
Wasp﹕ Header - [Cache-Control: no-cache]
Wasp﹕ Header - [Content-Length: 85]
Wasp﹕ Header - [Content-Type: text/plain; charset=utf-8]
Wasp﹕ Header - [Date: Mon, 18 May 2015 09:50:38 GMT]
Wasp﹕ Header - [Expires: -1]
Wasp﹕ Header - [OkHttp-Received-Millis: 1431942628563]
Wasp﹕ Header - [OkHttp-Selected-Protocol: http/1.1]
Wasp﹕ Header - [OkHttp-Sent-Millis: 1431942628400]
Wasp﹕ Header - [Pragma: no-cache]
Wasp﹕ Header - [Server: Microsoft-IIS/7.5]
Wasp﹕ Header - [WWW-Authenticate: Negotiate]
Wasp﹕ Body - There has been an error. try again BODY !!!
Wasp﹕ <--- END (Size: 85 bytes - Network time: 164.154053 ms)
Volley﹕ [2241] BasicNetwork.performRequest: Unexpected response code 401 for http://myserver.com/api/Get
Wasp﹕ <--- ERROR
Wasp﹕ Message - [null]
Wasp﹕ <--- RESPONSE 0 http://myserver.com/api/Get
Wasp﹕ Body - no body
Wasp﹕ <--- END (Size: 0 bytes - Network time: 9386 ms)

Why in callback body is null but it should be : There has been an error. try again BODY !!!

 @Override
                                public void onError(WaspError waspError) {
                                    Log.e("TAG", "test: "+ waspError.getErrorMessage());
                                    Log.e("TAG", "test: "+ waspError.getRespone().getBody());
                                    Log.e("TAG", "test: "+ waspError.getRespone().getStatusCode());
                                }
@orhanobut orhanobut added the bug label May 18, 2015
@orhanobut orhanobut added this to the v1.10 milestone Jun 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants