T642: Error handling for rest controller.