Skip to content
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

Handle errors in updateTranslation #146

Open
WULCAN opened this issue Dec 7, 2024 · 0 comments
Open

Handle errors in updateTranslation #146

WULCAN opened this issue Dec 7, 2024 · 0 comments
Labels
🦐 small webapp Related to the Lyra web app

Comments

@WULCAN
Copy link
Collaborator

WULCAN commented Dec 7, 2024

Description

The server action updateTranslation returns an explicit object for some errors but throws a MessageNotFound if the request is for an unrecognized message.

I don't know exactly what happens with thrown errors from server actions but if we chose explicit error-representing objects for the other cases, I suspect our client will not handle this thrown error very well.

  1. Understand and describe how thrown errors are handled in server actions.
  2. Review how that affects our use of updateTranslation
  3. Potentially update our error handling in updateTranslation

Estimated size (S, M, L)

I think this issue is Small because the problem is local and contained.

Possible implementations

One possibility is to return an explicit error-representing object instead. Our client-side code probably handles those.

Open questions

  1. In what cases can this error state actually happen?
  2. What is the ideal error handling for those cases?
@WULCAN WULCAN added webapp Related to the Lyra web app 🦐 small labels Dec 7, 2024
@WULCAN WULCAN mentioned this issue Dec 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🦐 small webapp Related to the Lyra web app
Projects
None yet
Development

No branches or pull requests

1 participant