Add proper response and error handling.