-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
fix(action): Show the error info when deleting the action failed #27124
Conversation
@Twixes Could you please review my pull request? Thank you. |
This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the |
waiting |
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.
Thank you for the PR @xu20160924!
Just one thing I noticed: It looks like there's actually a few more analogous void deleteWithUndo(...)
call sites – they should all be .catch()
ing potential errors, so that app behavior is consistent. Can you update those places too?
3432e79
to
7e4bc52
Compare
}).catch((e) => { | ||
lemonToast.error(`Failed to delete hog function: ${e.detail}`) | ||
}) |
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.
Oh, thank you for going through all these! However, I wasn't clear enough, which I apologize about: We don't in fact want .catch()
inside logics, since we have automatic error handling there.
This PR only needs to affect onClick
handlers.
Can you quickly revert the changes to logic files? Then we'll be able to get this in immediately. :)
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.
Sorry for the incorrectly modified, I didn't notice the automatic error handling, I've reverted it.
7e4bc52
to
f9580a8
Compare
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.
Awesome
Problem
Same delete API of the backend, but in the list missing shows the error information
Changes
👉 Stay up-to-date with PostHog coding conventions for a smoother review.
Handle the exceptions in the action list and display it.
Does this work well for both Cloud and self-hosted?
self-hosted worked
How did you test this code?
Self-hosted test