diff options
Diffstat (limited to 'client/src/app/helpers/utils')
-rw-r--r-- | client/src/app/helpers/utils/upload.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/client/src/app/helpers/utils/upload.ts b/client/src/app/helpers/utils/upload.ts index d7e1f7237..b60951612 100644 --- a/client/src/app/helpers/utils/upload.ts +++ b/client/src/app/helpers/utils/upload.ts | |||
@@ -5,14 +5,15 @@ import { HttpStatusCode } from '@shared/models' | |||
5 | function genericUploadErrorHandler (options: { | 5 | function genericUploadErrorHandler (options: { |
6 | err: Pick<HttpErrorResponse, 'message' | 'status' | 'headers'> | 6 | err: Pick<HttpErrorResponse, 'message' | 'status' | 'headers'> |
7 | name: string | 7 | name: string |
8 | notifier: Notifier | 8 | notifier?: Notifier |
9 | sticky?: boolean | 9 | sticky?: boolean |
10 | }) { | 10 | }) { |
11 | const { err, name, notifier, sticky = false } = options | 11 | const { err, name, notifier, sticky = false } = options |
12 | const title = $localize`Upload failed` | 12 | const title = $localize`Upload failed` |
13 | const message = buildMessage(name, err) | 13 | const message = buildMessage(name, err) |
14 | 14 | ||
15 | notifier.error(message, title, null, sticky) | 15 | if (notifier) notifier.error(message, title, null, sticky) |
16 | |||
16 | return message | 17 | return message |
17 | } | 18 | } |
18 | 19 | ||