diff --git a/packages/eas-cli/src/worker/upload.ts b/packages/eas-cli/src/worker/upload.ts index f8f690c423..36443e6154 100644 --- a/packages/eas-cli/src/worker/upload.ts +++ b/packages/eas-cli/src/worker/upload.ts @@ -109,7 +109,7 @@ export async function uploadAsync(params: UploadParams): Promise { return retry(error); } - const getErrorMessage = async () => { + const getErrorMessageAsync = async () => { const body = await response.json().catch(() => null); return body?.error ?? `Upload of "${filePath}" failed: ${response.statusText}`; } @@ -120,12 +120,12 @@ export async function uploadAsync(params: UploadParams): Promise { response.status === 429 || (response.status >= 500 && response.status <= 599) ) { - return retry(new Error(await getErrorMessage())); + return retry(new Error(await getErrorMessageAsync())); } else if (response.status === 413) { const message = `Upload of "${filePath}" failed: File size exceeded the upload limit`; throw new Error(message); } else if (!response.ok) { - throw new Error(await getErrorMessage()); + throw new Error(await getErrorMessageAsync()); } return {