From 142b5dfc1ba7d90b1edc84296440e1529f0e9794 Mon Sep 17 00:00:00 2001
From: Paul Frazee <pfrazee@gmail.com>
Date: Thu, 19 Jan 2023 17:55:00 -0600
Subject: Fix a case where the 'aborted' error message was getting through

---
 src/view/com/composer/ComposePost.tsx | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

(limited to 'src/view/com/composer/ComposePost.tsx')

diff --git a/src/view/com/composer/ComposePost.tsx b/src/view/com/composer/ComposePost.tsx
index 3614267b1..0051d72a4 100644
--- a/src/view/com/composer/ComposePost.tsx
+++ b/src/view/com/composer/ComposePost.tsx
@@ -32,7 +32,11 @@ import {useStores} from '../../../state'
 import * as apilib from '../../../state/lib/api'
 import {ComposerOpts} from '../../../state/models/shell-ui'
 import {s, colors, gradients} from '../../lib/styles'
-import {detectLinkables, extractEntities} from '../../../lib/strings'
+import {
+  detectLinkables,
+  extractEntities,
+  cleanError,
+} from '../../../lib/strings'
 import {getLinkMeta} from '../../../lib/link-meta'
 import {downloadAndResize} from '../../../lib/images'
 import {UserLocalPhotosModel} from '../../../state/models/user-local-photos'
@@ -212,7 +216,7 @@ export const ComposePost = observer(function ComposePost({
   }
   const onPaste = async (err: string | undefined, files: PastedFile[]) => {
     if (err) {
-      return setError(err)
+      return setError(cleanError(err))
     }
     if (selectedPhotos.length >= 4) {
       return
@@ -249,7 +253,7 @@ export const ComposePost = observer(function ComposePost({
         setProcessingState,
       )
     } catch (e: any) {
-      setError(e.message)
+      setError(cleanError(e.message))
       setIsProcessing(false)
       return
     }
-- 
cgit 1.4.1

