From 5360027b5f44b75afd14741f8bb54738a1fc2be5 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 26 Oct 2026 10:18:16 -0700 Subject: 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 Claude-Session: https://claude.ai/code/session_01QjVvE4YAcK3AGwV7kZXeN4 --- src/app.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/app.js') 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; } -- cgit v1.2.3