rides-java-sdk icon indicating copy to clipboard operation
rides-java-sdk copied to clipboard

NPE for wrong clientSecret during TokenAccess

Open wasi1989 opened this issue 9 years ago • 0 comments

It was not showing correct message for wrong clientSecret rather throwing NPE. When i checked in code If response is not 200 then you are parsing it to TokenResponseException . You are creating instance of TokenResponseException by using response.getContent() and failing in JsonParser(below is code) because content is returning null . public JsonParser createJsonParser(InputStream in, Charset charset) throws IOException { Preconditions.checkNotNull(in); return new JacksonParser(this, this.factory.createJsonParser(in)); } SS attached.

More Details: http://stackoverflow.com/questions/41012392/unauthorized-error-in-uber-token-api response

wasi1989 avatar Dec 11 '16 16:12 wasi1989