mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2025-05-19 23:46:55 +08:00
fix: Handle exceptions on APIs in a more legible way
This commit is contained in:
@ -42,9 +42,8 @@ class GithubAPI {
|
||||
);
|
||||
return response.data;
|
||||
} on Exception {
|
||||
// ignore
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
Future<List<String>> getCommits(
|
||||
@ -70,9 +69,8 @@ class GithubAPI {
|
||||
(commit['commit']['message'] as String).split('\n')[0])
|
||||
.toList();
|
||||
} on Exception {
|
||||
// ignore
|
||||
return List.empty();
|
||||
}
|
||||
return List.empty();
|
||||
}
|
||||
|
||||
Future<File?> getLatestReleaseFile(String extension, String repoName) async {
|
||||
@ -104,7 +102,7 @@ class GithubAPI {
|
||||
patches = list.map((patch) => Patch.fromJson(patch)).toList();
|
||||
}
|
||||
} on Exception {
|
||||
// ignore
|
||||
return List.empty();
|
||||
}
|
||||
return patches;
|
||||
}
|
||||
|
Reference in New Issue
Block a user