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 error when submitting task #1802

Merged
merged 2 commits into from Feb 23, 2023
Merged

handle error when submitting task #1802

merged 2 commits into from Feb 23, 2023

Conversation

notmd
Copy link
Collaborator

@notmd notmd commented Feb 22, 2023

close #1723

I also add loading state for submit and skip task

Comment on lines 3 to 15
"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"
Copy link
Collaborator Author

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

Copy link
Collaborator Author

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?

Copy link
Collaborator

@AbdBarho AbdBarho Feb 23, 2023

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."

Copy link
Collaborator

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.

Copy link
Collaborator

@AbdBarho AbdBarho left a comment

Choose a reason for hiding this comment

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

LGTM

Comment on lines 3 to 15
"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"
Copy link
Collaborator

@AbdBarho AbdBarho Feb 23, 2023

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."

@AbdBarho
Copy link
Collaborator

AbdBarho commented Feb 23, 2023

are there any automatic retries here? or do we just send the user back to editing state?

@andreaskoepf
Copy link
Collaborator

Closes #1138

@andreaskoepf
Copy link
Collaborator

are there any automatic retries here? or do we just send the user back to editing state?

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.

@notmd
Copy link
Collaborator Author

notmd commented Feb 23, 2023

are there any automatic retries here? or do we just send the user back to editing state?

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.

@notmd notmd enabled auto-merge (squash) February 23, 2023 14:42
@notmd notmd merged commit 7eaebba into main Feb 23, 2023
@notmd notmd deleted the task_error_handling branch February 23, 2023 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants