You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Typically we can log the error to the console but display something else to the user, like: "An error occurred while executing this query, please try again later." or if we handle this specific timeout we can say "Please try to narrow down your search"
Hi Daniel, We added this to log the error to make it more meaningful. However, we could not test this snippet since we are unable to recreate this error on our branch. Since both our locahost and the production portal are pointing to the same DB server, we assume that this error is due to node.js/npm server timeout. On our instance, it takes about 50 secs to 1 minute to populate the table when we search for cancer and if the timeout threshold is less than that, it probably throws the error. We request you to pull in our changes and we can see whether our new message appears. THanks.
catch (error) {
console.error("Error fetching C2M2 Main table:", error);
// Check if the error is a timeout error
if (error instanceof Error && error.message.includes("Timed out")) {
console.error("Error fetching C2M2 Main table:", error);
return <div>This error was caused by a timeout. Please narrow down your search.</div>;
}
// General error handling
return <div>Error fetching C2M2 Main table: {(error as Error).message}</div>;
}
The below error message needs to be replaced with something more human readable:
The text was updated successfully, but these errors were encountered: