如何调试Sheets.Spreadsheets.batchUpdate报错及排查请求是否被拒?
Google Apps Script跨项目表格导入脚本的错误调试与请求排查
错误详情
我有一个通过脚本ID实现跨项目表格导入的Google Apps Script脚本,由于脚本规模极大,无法提炼出最小可复现示例(MRE)。当前遇到的错误提示如下:
Exception: Unexpected error while getting the method or property batchUpdate on object Apiary.sheets.spreadsheets.
目前仍在排查错误触发条件,但未找到任何官方文档说明该错误的含义,希望先明确错误本质以推进调试工作。
请求状态排查问题
同时想了解如何判断批量更新请求是否被拒绝,以下是其中一个请求的代码片段:
requests.push( {// updateCells: { range: { sheetId: _get_budget_sheetIDs().currentSheetID, startRowIndex: startRow - 1, startColumnIndex: sheet().column - 1, endColumnIndex: sheet().column - 1 + cata2Load[0].length }, rows: _get_batch_update_type(cata2Load), fields: "userEnteredValue" } } );
假设这是唯一通过Sheets.Spreadsheets.batchUpdate({ requests: requests}, ID);发起的批量更新请求,请问如何修改这段调用代码,以获取该请求是否被拒绝的具体信息?
内容的提问来源于stack exchange,提问作者J_code
相关产品推荐
相关产品推荐

