-
Notifications
You must be signed in to change notification settings - Fork 76
fix: improve attachment upload error notification data #1542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Size Change: +398 B (+0.1%) Total Size: 382 kB
|
88d9893
to
14cdd43
Compare
…rror-msg # Conflicts: # src/messageComposer/attachmentManager.ts
metadata: { | ||
reason: localAttachment.localMetadata.uploadPermissionCheck?.reason, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it worth adding original error object at the same level the reason
property is (if this is available in the UI)? ErrorFromResponse
contains quite a bit of data which could be useful, like code
and status
numbers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But this not a error from a response. This is a reason calculated based on the back-end config.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad, this was a wrong pick but there are other invocations where the error object is available.
options: { | ||
code: 'poll.creation.failed', | ||
metadata: { | ||
reason: (error as Error).message, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👆 here for example
Co-authored-by: Anton Arnautov <43254280+arnautov-anton@users.noreply.github.com>
Goal
Closes REACT-399
Provide more contextual information regarding the reasons of upload failure or blockage.
Add code property to the Notification type to allow to identify notifications based on a type (kind of a grouping).