[PB-5882]: feat/show request Id if exists when an error occurs#1859
[PB-5882]: feat/show request Id if exists when an error occurs#1859
Conversation
Deploying drive-web with
|
| Latest commit: |
7aea870
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://8bb795ca.drive-web.pages.dev |
| Branch Preview URL: | https://feature-show-request-id-in-t.drive-web.pages.dev |
sg-gs
left a comment
There was a problem hiding this comment.
Just a thing that could be more maintainable if possible: could be better to decorate the error inside the SDK, where the client centralises the error handling rather than expanding the cast function around this app? This + showing the requestId on the toast if it is present could be easier to manage, considering that this could be extended to other apps like Meet and other platforms like Mobile
Okay, now we return tthe I will push the changes once the SDK PR is merged and new release is done. |
|
|
||
| if (backupData.mnemonic && validateMnemonic(backupData.mnemonic)) { | ||
| setBackupKeyContent(uploadedBackupKeyContent); | ||
| return; |
There was a problem hiding this comment.
why have removed this return?
There was a problem hiding this comment.
Because it is no longer needed. I added the error notification in the catch, not outside.
There was a problem hiding this comment.
ah right! 👌
But be careful, because now if there is no mnemonic in backupData, the error message does not appear, whereas before it did
There was a problem hiding this comment.
Lol. Let me change it then
| const handleCopyRequestId = () => { | ||
| if (requestId) { | ||
| navigator.clipboard.writeText(requestId); | ||
| } | ||
| }; |
There was a problem hiding this comment.
WWhen the user presses copy, some visual feedback would be great, otherwise they won't know if it has been copied to the clipboard or not
|



Description
When a request fails and the x-request-id header is available in the response, it is included in the error toast notification.
Related Issues
Related Pull Requests
Checklist
Testing Process
Additional Notes