mirror of
https://github.com/silkimen/cordova-plugin-advanced-http.git
synced 2026-07-26 00:00:14 +08:00
Fix #185: need more detailed SSL error message
This commit is contained in:
@@ -270,11 +270,11 @@ abstract class CordovaHttp {
|
||||
|
||||
protected void handleHttpRequestException(HttpRequestException e) {
|
||||
if (e.getCause() instanceof UnknownHostException) {
|
||||
this.respondWithError(0, "The host could not be resolved");
|
||||
this.respondWithError(0, "The host could not be resolved: " + e.getMessage());
|
||||
} else if (e.getCause() instanceof SocketTimeoutException) {
|
||||
this.respondWithError(1, "The request timed out");
|
||||
this.respondWithError(1, "The request timed out: " + e.getMessage());
|
||||
} else if (e.getCause() instanceof SSLHandshakeException) {
|
||||
this.respondWithError("SSL handshake failed");
|
||||
this.respondWithError(-2, "SSL handshake failed: " + e.getMessage());
|
||||
} else {
|
||||
this.respondWithError("There was an error with the request: " + e.getMessage());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user