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
App crashes when connection to remote is invalid #315
Comments
FlorianSW
added a commit
to FlorianSW/openhab.android
that referenced
this issue
Jun 12, 2017
If the connection to the remote host could not be established, the app creates a fake response with the error message and status code 500 for the notification settings sync hhtp request. However, until now, the creation of this Fake response failed, as the Response builder requires some data, which was not given so far. This also refactors the MyHttpClient sslSetup method, which does not need to get the whole context passed to it and therefore the constructors of MyAsync and MySyncHttpClient does not need this neither. It now takes a boolean argument, which indicates, if hostnames of a ssl cert should be ignored or not. Fixes openhab#315
digitaldan
pushed a commit
that referenced
this issue
Jun 30, 2017
* Fix crash if "No route to host" If the connection to the remote host could not be established, the app creates a fake response with the error message and status code 500 for the notification settings sync hhtp request. However, until now, the creation of this Fake response failed, as the Response builder requires some data, which was not given so far. This also refactors the MyHttpClient sslSetup method, which does not need to get the whole context passed to it and therefore the constructors of MyAsync and MySyncHttpClient does not need this neither. It now takes a boolean argument, which indicates, if hostnames of a ssl cert should be ignored or not. Fixes #315 * Fix changed method signature * Fix new method signature for Test * Add more detailed information in error message (Exception class) This also allows us to have a test case, which still checks that the request failed for the correct reason but does not rely on the exact error message anymore, which seems to be different in different circumstances.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If the app cannot connect to the given remote url, it simply crashes with this stask trace:
The text was updated successfully, but these errors were encountered: