-
Notifications
You must be signed in to change notification settings - Fork 26
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
Implement an actual error handling mechanism #677
Comments
This issue is getting more and more relevant to provide user feedback when an error occurs during training. We need a reliable framework to pass an error that occurs in discojs or the server to the webapp and convert it to a user-friendly error message. Currently this is done by parsing the error message which is far from ideal: if (error.message.includes("provided in columnConfigs does not match any of the column names")) {
// missing field is specified between two "quotes"
const missingFields: String = error.message.split('"')[1].split('"')[0];
toaster.error(`The input data is missing the field "${missingFields}"`);
} An idea would be to give specific errors identifiers such as error numbers and associate each error number with a user-friendly error message. However this requires sharing the error number table between discojs, the webapp and the server and increase interdepency. |
@tharvik do you have any ideas or opinions? |
error handling is hard. exception based: values based: so that doesn't really answers on what we can actually do in our case. I'm proposing the following
and as the code evolves, we can put more and more |
Currently, errors are handled individually on the direct catch. We need a proper mechanism to communicate errors between the backend and the frontend to enable good user feedback when something fails or when users are not using DISCO in the intended way.
For example, rather than parsing the error message to identify the error, we can subtype errors to make identifiable more reliably.
The text was updated successfully, but these errors were encountered: