pub fn create_error_response(message: &str) -> Result<Response>
Helper function to create an error response