respond with proper status code