I wouldn't return the error message. Return a meaningful value or error out and let it bubble up. How you handle the error is up to you, but at a minimum I would gracefully handle it on the front end and log/notify someone on the backend.
If you insist on returning something even when your function errors out then I would return an object that has the following members:
Value - String
Success - Bool
Then you can check for success and handle the value accordingly.