{"action":"created","issue":{"url":"https://api.github.com/repos/square/retrofit/issues/1235","labels_url":"https://api.github.com/repos/square/retrofit/issues/1235/labels{/name}","comments_url":"https://api.github.com/repos/square/retrofit/issues/1235/comments","events_url":"https://api.github.com/repos/square/retrofit/issues/1235/events","html_url":"https://github.com/square/retrofit/issues/1235","id":113525096,"number":1235,"title":"Receiving NULL on response error body if the status code is 400 ","user":{"login":"Sutirth","id":3212997,"avatar_url":"https://avatars.githubusercontent.com/u/3212997?v=3","gravatar_id":"","url":"https://api.github.com/users/Sutirth","html_url":"https://github.com/Sutirth","followers_url":"https://api.github.com/users/Sutirth/followers","following_url":"https://api.github.com/users/Sutirth/following{/other_user}","gists_url":"https://api.github.com/users/Sutirth/gists{/gist_id}","starred_url":"https://api.github.com/users/Sutirth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sutirth/subscriptions","organizations_url":"https://api.github.com/users/Sutirth/orgs","repos_url":"https://api.github.com/users/Sutirth/repos","events_url":"https://api.github.com/users/Sutirth/events{/privacy}","received_events_url":"https://api.github.com/users/Sutirth/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/square/retrofit/labels/Needs%20Info","name":"Needs Info","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-10-27T07:48:32Z","updated_at":"2015-10-27T13:43:26Z","closed_at":null,"body":"Hi I get response as null in Retrofit error body response if the response code is 400. I even inspected the issue by applying HttpLoggingInceptor and as seen in the below log you get the response in Okhttp but it really never comes to Retrofit hence stucked and confuse at this situation. For code 200 it works perfectly fine\r\n\r\n\r\n\r\n <-- HTTP/1.1 400 Bad Request (2080ms)\r\nAccess-Control-Allow-Origin: http://ec2-52-89-241-222.us-west-2.compute.amazonaws.com:3000\r\n Access-Control-Allow-Credentials: true\r\n Access-Control-Allow-Headers: origin, content-type, accept\r\nServer: akka-http/2.3.14\r\n Date: Tue, 27 Oct 2015 07:40:25 GMT\r\n Content-Type: application/json\r\n Content-Length: 54\r\n OkHttp-Selected-Protocol: http/1.1\r\n OkHttp-Sent-Millis: 1445931611243\r\nOkHttp-Received-Millis: 1445931612103\r\n {\r\n \"appStatusCode\" : 100,\r\n   \"data\" : \"UNKNOWN_TEAM\"\r\n }\r\n<-- END HTTP (54-byte body)\r\n code = 400\r\n ERROR: null"},"comment":{"url":"https://api.github.com/repos/square/retrofit/issues/comments/151500643","html_url":"https://github.com/square/retrofit/issues/1235#issuecomment-151500643","issue_url":"https://api.github.com/repos/square/retrofit/issues/1235","id":151500643,"user":{"login":"Sutirth","id":3212997,"avatar_url":"https://avatars.githubusercontent.com/u/3212997?v=3","gravatar_id":"","url":"https://api.github.com/users/Sutirth","html_url":"https://github.com/Sutirth","followers_url":"https://api.github.com/users/Sutirth/followers","following_url":"https://api.github.com/users/Sutirth/following{/other_user}","gists_url":"https://api.github.com/users/Sutirth/gists{/gist_id}","starred_url":"https://api.github.com/users/Sutirth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sutirth/subscriptions","organizations_url":"https://api.github.com/users/Sutirth/orgs","repos_url":"https://api.github.com/users/Sutirth/repos","events_url":"https://api.github.com/users/Sutirth/events{/privacy}","received_events_url":"https://api.github.com/users/Sutirth/received_events","type":"User","site_admin":false},"created_at":"2015-10-27T13:43:26Z","updated_at":"2015-10-27T13:43:26Z","body":" Using this in code and with its respective gradle dependencies\r\n\r\n OkHttpClient client = new OkHttpClient();\r\n        HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor();\r\n        interceptor.setLevel(HttpLoggingInterceptor.Level.BODY);\r\n        client.interceptors().add(interceptor);"}}