Describe the problem
i can't seem to get the error message of a remote async function, when it throws an error
try {
await submit();
} catch (error) {
toast.error(error?.message || 'Oh no! Something went wrong');
}
Never displays the error message thrown on the backend.
Describe the proposed solution
Enhancement: I would like to be able to optionally use thrown errors on the backend remote function instead of returning a result object. This allows me to simply try/catch a remote function call, and then display the error of the promise.
That way, the dev can decide if he wants the promise to fail altogether, or just return an error result.
Alternatives considered
not using thrown errors
Importance
would make my life easier
Additional Information
No response