mirror of
https://github.com/M66B/FairEmail.git
synced 2025-03-03 18:26:20 +00:00
DeepL: use HttpStatusException
This commit is contained in:
parent
944e08fd8f
commit
0c92c83ccc
1 changed files with 2 additions and 1 deletions
|
@ -47,6 +47,7 @@ import com.google.android.material.textfield.TextInputLayout;
|
||||||
import org.json.JSONArray;
|
import org.json.JSONArray;
|
||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
|
import org.jsoup.HttpStatusException;
|
||||||
import org.jsoup.nodes.Document;
|
import org.jsoup.nodes.Document;
|
||||||
import org.jsoup.nodes.Element;
|
import org.jsoup.nodes.Element;
|
||||||
import org.jsoup.select.Elements;
|
import org.jsoup.select.Elements;
|
||||||
|
@ -275,7 +276,7 @@ public class DeepL {
|
||||||
} catch (Throwable ex) {
|
} catch (Throwable ex) {
|
||||||
Log.w(ex);
|
Log.w(ex);
|
||||||
}
|
}
|
||||||
throw new IOException(error);
|
throw new HttpStatusException(error, status, url.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
String response = Helper.readStream(connection.getInputStream());
|
String response = Helper.readStream(connection.getInputStream());
|
||||||
|
|
Loading…
Reference in a new issue