Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(site): show error on template upload failure#15558

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ethanndickson merged 1 commit intomainfromethan/template-upload-fail
Nov 22, 2024

Conversation

ethanndickson
Copy link
Member

@ethanndicksonethanndickson commentedNov 18, 2024
edited
Loading

Closes#15441.

@ethanndicksonGraphite App
Copy link
MemberAuthor

This stack of pull requests is managed byGraphite. Learn more aboutstacking.

@ethanndicksonethanndickson marked this pull request as ready for reviewNovember 18, 2024 10:51
onUpload: async (file: File) => {
try {
await uploadFileMutation.mutateAsync(file);
} catch (error) {
Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I'm not familiar with this query library, but what I found is that even though you can setonError, an exception returned frommutateAsync isn't caught unless you explicitly catch it. So, If I displayed the error as part ofonError inuseMutation, I'd still need to wrapmutateAsync in a try block, with an empty catch, which seems pointless.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

You did it correctly. We usually usemutateAsync to keep the error handling close to where the mutation is called.

Copy link
Collaborator

@BrunoQuaresmaBrunoQuaresmaNov 22, 2024
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Nice test 👍

@ethanndicksonethanndickson merged commita35c01d intomainNov 22, 2024
28 checks passed
@ethanndicksonethanndickson deleted the ethan/template-upload-fail branchNovember 22, 2024 12:46
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@BrunoQuaresmaBrunoQuaresmaBrunoQuaresma approved these changes

Assignees

@ethanndicksonethanndickson

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Web UI provides no feedback for a failed template upload
2 participants
@ethanndickson@BrunoQuaresma

[8]ページ先頭

©2009-2025 Movatter.jp