test controller error handling with Promise