Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Commit

Permalink
[expo-cli] upload:android - add better error messages for issues with…
Browse files Browse the repository at this point in the history
… downloading archive file (#2384)

* [expo-cli] add better error messages for issues with downloading archive file

* update CHANGELOG

* Update CHANGELOG.md

* Update packages/expo-cli/src/commands/upload/submission-service/utils/errors.ts

Co-authored-by: Wojciech Kozyra <wojciech.kozyra@swmansion.com>

Co-authored-by: Wojciech Kozyra <wojciech.kozyra@swmansion.com>
  • Loading branch information
dsokal and wkozyra95 authored Jul 23, 2020
1 parent ae7e55c commit 375ebff
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ This is the log of notable changes to Expo CLI and related packages.
### 🎉 New features

- [xdl] Log output from Gradle Wrapper is a lot cleaner now. It doesn't print dots when the appropriate Gradle version is being downloaded ([#2355](https://github.com/expo/expo-cli/pull/2355)).
- [expo-cli] expo upload:android - Add better error messages when downloading archive file failed [#2384](https://github.com/expo/expo-cli/pull/2384).

### 🐛 Bug fixes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,19 @@ import { SubmissionError } from '../SubmissionService.types';
import log from '../../../../log';

enum SubmissionErrorCode {
ARCHIVE_DOWNLOAD_NOT_FOUND_ERROR = 'SUBMISSION_SERVICE_COMMON_ARCHIVE_DOWNLOAD_NOT_FOUND_ERROR',
ARCHIVE_DOWNLOAD_FORBIDDEN_ERROR = 'SUBMISSION_SERVICE_COMMON_ARCHIVE_DOWNLOAD_FORBIDDEN_ERROR',
ANDROID_UNKNOWN_ERROR = 'SUBMISSION_SERVICE_ANDROID_UNKNOWN_ERROR',
ANDROID_FIRST_UPLOAD_ERROR = 'SUBMISSION_SERVICE_ANDROID_FIRST_UPLOAD_ERROR',
ANDROID_OLD_VERSION_CODE_ERROR = 'SUBMISSION_SERVICE_ANDROID_OLD_VERSION_CODE_ERROR',
ANDROID_MISSING_PRIVACY_POLICY = 'SUBMISSION_SERVICE_ANDROID_MISSING_PRIVACY_POLICY',
}

const SubmissionErrorMessages: Record<SubmissionErrorCode, string> = {
[SubmissionErrorCode.ARCHIVE_DOWNLOAD_NOT_FOUND_ERROR]:
"Failed to download the archive file (Response code: 404 Not Found). Please make sure the URL you've provided is correct.",
[SubmissionErrorCode.ARCHIVE_DOWNLOAD_FORBIDDEN_ERROR]:
'Failed to download the archive file (Response code: 403 Forbidden). This is most probably caused by trying to upload an expired build artifact. All Expo build artifacts expire after 30 days.',
[SubmissionErrorCode.ANDROID_UNKNOWN_ERROR]:
"We couldn't figure out what went wrong. Please see logs to learn more.",
[SubmissionErrorCode.ANDROID_FIRST_UPLOAD_ERROR]:
Expand Down

0 comments on commit 375ebff

Please sign in to comment.