Access the action error message when fail
Hello,
When I call an action that make a mutation to an external API, and the request fails, I get a Convex Error string, but I need to access the API response error message.
How can I access only the error string? In this case:
El certificado no es un CSD. Asegúrate de no estar enviando una FIEL.
4 Replies
In prod the message won’t be sent to the client. Look up ConvexError. search.convex.dev
Thank you @ian, but how then I get the API response message to the client with an action?
If you throw a ConvexError in an action the client will also throw a ConvexError with the same data
Ok, I'll try that!