Since the API is used from the UI, it would be better to indicate exceptions with a special return value than by forwarding the exception to the UI.