From 9bfa1a35771f56f9e6981dd251bf0fa6476202fd Mon Sep 17 00:00:00 2001 From: infinite-persistence Date: Fri, 12 Nov 2021 08:59:07 +0800 Subject: [PATCH] Notify: Disable retry + try to report status code --- web/setup/publish-v2.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/setup/publish-v2.js b/web/setup/publish-v2.js index 808360de1..6e1b0ee50 100644 --- a/web/setup/publish-v2.js +++ b/web/setup/publish-v2.js @@ -56,7 +56,7 @@ export function makeResumableUploadRequest( window.store.dispatch(doUpdateUploadProgress({ params, progress: percentage })); }, onSuccess: () => { - let retries = 2; + let retries = 0; function makeNotifyRequest() { const xhr = new XMLHttpRequest(); @@ -75,7 +75,7 @@ export function makeResumableUploadRequest( setTimeout(() => makeNotifyRequest(), 10000); } else { window.store.dispatch(doUpdateUploadProgress({ params, status: 'error' })); - reject(new Error(__('There was a problem in the processing. Please retry.'))); + reject(new Error(`There was a problem in the processing. Please retry. (${xhr.status})`)); } }; xhr.onabort = () => {