Skip to content

Commit

Permalink
[Infrastructure] Handle the api is unavailable
Browse files Browse the repository at this point in the history
  • Loading branch information
Wolfteam committed Nov 6, 2022
1 parent 0a08f5c commit 3e23e61
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/domain/enums/app_resource_update_result_type.dart
Expand Up @@ -9,4 +9,5 @@ enum AppResourceUpdateResultType {
updatesAvailable,
updating,
updated,
apiIsUnavailable,
}
2 changes: 2 additions & 0 deletions lib/infrastructure/resources_service.dart
Expand Up @@ -250,6 +250,8 @@ class ResourceServiceImpl implements ResourceService {
return CheckForUpdatesResult(type: AppResourceUpdateResultType.needsLatestAppVersion, resourceVersion: currentResourcesVersion);
case '4':
return CheckForUpdatesResult(type: AppResourceUpdateResultType.noUpdatesAvailable, resourceVersion: currentResourcesVersion);
case '5':
return CheckForUpdatesResult(type: AppResourceUpdateResultType.apiIsUnavailable, resourceVersion: currentResourcesVersion);
case null:
break;
default: // Unknown error
Expand Down

0 comments on commit 3e23e61

Please sign in to comment.