Improve error messages in bts_api_generator