Skip to content

Commit

Permalink
fix: better error catch in android download
Browse files Browse the repository at this point in the history
  • Loading branch information
riderx committed Aug 3, 2022
1 parent 8fe1d15 commit 39a4f01
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,14 @@ public void getPluginVersion(final PluginCall call) {
public void download(final PluginCall call) {
final String url = call.getString("url");
final String version = call.getString("version");
if (url == null || version == null) {
Log.e(CapacitorUpdater.TAG, "missing url or version");
call.reject("missing url or version");
if (url == null) {
Log.e(CapacitorUpdater.TAG, "Download called without url");
call.reject("Download called without url");
return;
}
if (version == null) {
Log.e(CapacitorUpdater.TAG, "Download called without version");
call.reject("Download called without version");
return;
}
try {
Expand Down

0 comments on commit 39a4f01

Please sign in to comment.