return the exception to the client in case an exception was thrown.