fix(Google BigQuery Node): Better error messages, transform timestamps (#9255)

Co-authored-by: Jonathan Bennetts <jonathan.bennetts@gmail.com>
This commit is contained in:
Elias Meire
2024-05-02 12:11:41 +02:00
committed by GitHub
parent e896889394
commit 7ff24f134b
5 changed files with 39 additions and 10 deletions

View File

@@ -249,10 +249,16 @@ export async function execute(this: IExecuteFunctions): Promise<INodeExecutionDa
returnData.push(...executionErrorData);
continue;
}
if ((error.message as string).includes('location')) {
if ((error.message as string).includes('location') || error.httpCode === '404') {
error.description =
"Are you sure your table is in that region? You can specify the region using the 'Location' parameter from options.";
}
if (error.httpCode === '403' && error.message.includes('Drive')) {
error.description =
'If your table(s) pull from a document in Google Drive, make sure that document is shared with your user';
}
throw new NodeOperationError(this.getNode(), error as Error, {
itemIndex: i,
description: error.description,