Returning simplified error message when catching errors server-side


#1

Is there a way to get only the simplified error message when catching errors server-side? I essentially want to show Transform.transform errors in a tooltip, so I’m catching errors for each field individually and returning them alongside the successfully transformed data.

If I don’t catch the error and throw it directly to the client, I get back an ActionError that’s structured nicely with e.message: ”Value not convertible to datetime: String”

But, if I catch it server-side in my JavaScript API and try to return it as data, it seems to be a JavaException and e.message is "c3.love.exceptions.C3RuntimeException: Value not convertible to datetime: String"

I’d like to avoid doing any specific string manipulation if possible.