Error messages does not show up

I am trying to return an error message on a custom method invoke, but no matter what I do it seems to just return undefined when I use ${result.error.message} even though the same error method on the functions made by Radzen don't have the same issue.

I copied the private Error function straight from the auth controller. Is there something special to it's implementation?

You should check the exact server response in the browser network tab. ${result.error.message} is only suitable in OData responses which custom methods are not.