diff --git a/src/components/compose.jsx b/src/components/compose.jsx index 49553702..2bcfe09e 100644 --- a/src/components/compose.jsx +++ b/src/components/compose.jsx @@ -1838,10 +1838,17 @@ function MediaAttachment({ method: 'POST', body, }).then((r) => r.json()); + if (response.error) { + throw new Error(response.error); + } setDescription(response.description); } catch (e) { console.error(e); - showToast('Failed to generate description'); + showToast( + `Failed to generate description${ + e?.message ? `: ${e.message}` : '' + }`, + ); } finally { setUIState('default'); toastRef.current?.hideToast?.();