aboutsummaryrefslogtreecommitdiffstats
path: root/src/app.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-10-26 10:18:16 -0700
committerAdam Soltys <[email protected]>2026-10-26 10:18:16 -0700
commit5360027b5f44b75afd14741f8bb54738a1fc2be5 (patch)
tree45964a3686c9b1da28ae812a6893e99d9919e677 /src/app.js
parent5fe2341616b2d1abdd7a3560371aff2d648e2311 (diff)
downloadcoinosv3-5360027b5f44b75afd14741f8bb54738a1fc2be5.tar.gz
coinosv3-5360027b5f44b75afd14741f8bb54738a1fc2be5.zip
An upload that fails says why: the host and its answer (or the signer's error) in the toast, not just "check your connection", which hid hosts refusing the file and a signer that never answered
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01QjVvE4YAcK3AGwV7kZXeN4
Diffstat (limited to 'src/app.js')
-rw-r--r--src/app.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/app.js b/src/app.js
index 6d6933f..9789401 100644
--- a/src/app.js
+++ b/src/app.js
@@ -3939,7 +3939,11 @@ async function publicMediaUpload(file) {
if (error instanceof MediaUploadError && error.code === 'unauthorized') throw new Error(t('mediaUploadUnauthorized'));
if (error instanceof MediaUploadError && error.code === 'too-big') throw new Error(t('mediaUploadTooBig'));
if (error instanceof MediaUploadError && error.code === 'unsupported') throw new Error(t('mediaUploadUnsupported'));
- throw new Error(t('msgUploadFailed'));
+ // what went wrong, said: "check your connection" alone hid a signer
+ // that never answered and hosts that refused the file
+ const why = String((error instanceof MediaUploadError ? error.details : '') || error?.message || '').slice(0, 200);
+ console.warn('media upload failed', error, why);
+ throw new Error(why && why !== 'failed' ? `${t('msgUploadFailed')} (${why})` : t('msgUploadFailed'));
} finally {
ui.mediaProgress = null;
}