authy-java icon indicating copy to clipboard operation
authy-java copied to clipboard

expose Verification response

Open czhang-hw opened this issue 8 years ago • 1 comments

currently, `try { path.append("start"); response = this.post(path.toString(), params);

  verification.setStatus(this.getStatus());
  verification.setResponse(response);
}

catch(Exception e) {
  e.printStackTrace();
}`

wraps all the exception, even for network errors, but for us, we want to be able to catch the network issues by ourself, so we can notice the problems. One suggestion is to stop catching all Exceptions, but if it's too much, we would like to at least have the access to the response message, so we can somehow figure out it's a network error or not.

czhang-hw avatar May 02 '18 20:05 czhang-hw

@czhang-hw Starting from version 1.3.2 we now wrap exceptions using a class called AuthyException, you can inspect the cause if you want more detail about the error.

suarezjulian avatar May 15 '18 20:05 suarezjulian