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 error when submitting task #1802
Conversation
website/public/locales/en/error.json
Outdated
"err_1000": "Ivalid task type", | ||
"err_1001": "Failed to acknowledge task", | ||
"err_1002": "Failed to not acknowledge task", | ||
"err_1003": "Invalid response type", | ||
"err_1004": "Interaction request failed", | ||
"err_1005": "Failed to generate task", | ||
"err_1006": "No tasks of type {{task_type}} are currently available.", | ||
"err_1007": "Task availability query failed", | ||
"err_1008": "Message size too long", | ||
"err_1009": "User recent messages have duplicates", | ||
"err_1010": "Message text is empty", | ||
"err_1011": "User cannot reply twice to the same message", | ||
"err_1012": "User has too many pending tasks" |
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.
I just copied these messages from the backend. Please suggest more friendly messages
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.
@andreaskoepf can you help on this?
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.
we could add what the user could do, for example "You have too many pending tasks, please wait for a couple of minutes and try again."
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.
I would show the error message which the backend sends for the "default case", e.g. I think that would be better than showing "Something went wrong!". Regarding more explanatory error messages: Sure, could be done in a separate PR if someone is interested in analyzing when the errors are generated, but IMO the strings as they are now are fine for v1.
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.
LGTM
website/public/locales/en/error.json
Outdated
"err_1000": "Ivalid task type", | ||
"err_1001": "Failed to acknowledge task", | ||
"err_1002": "Failed to not acknowledge task", | ||
"err_1003": "Invalid response type", | ||
"err_1004": "Interaction request failed", | ||
"err_1005": "Failed to generate task", | ||
"err_1006": "No tasks of type {{task_type}} are currently available.", | ||
"err_1007": "Task availability query failed", | ||
"err_1008": "Message size too long", | ||
"err_1009": "User recent messages have duplicates", | ||
"err_1010": "Message text is empty", | ||
"err_1011": "User cannot reply twice to the same message", | ||
"err_1012": "User has too many pending tasks" |
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.
we could add what the user could do, for example "You have too many pending tasks, please wait for a couple of minutes and try again."
are there any automatic retries here? or do we just send the user back to editing state? |
Closes #1138 |
IMO we don't need automatic retry.. if the error is shown to the users and they can manually try to re-submit everything is good. |
Yeah it does not auto retry. Just trigger the error message and back to the edit state. |
close #1723
I also add loading state for submit and skip task