mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-12 05:17:28 -08:00
fix(Google BigQuery Node): Error description improvement (#6715)
This commit is contained in:
parent
710421fcc3
commit
95837d2604
|
@ -91,7 +91,7 @@ const properties: INodeProperties[] = [
|
|||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Location',
|
||||
displayName: 'Location (Region)',
|
||||
name: 'location',
|
||||
type: 'string',
|
||||
default: '',
|
||||
|
@ -248,9 +248,13 @@ export async function execute(this: IExecuteFunctions): Promise<INodeExecutionDa
|
|||
returnData.push(...executionErrorData);
|
||||
continue;
|
||||
}
|
||||
throw new NodeOperationError(this.getNode(), error.message as string, {
|
||||
if ((error.message as string).includes('location')) {
|
||||
error.description =
|
||||
"Are you sure your table is in that region? You can specify the region using the 'Location' parameter from options.";
|
||||
}
|
||||
throw new NodeOperationError(this.getNode(), error as Error, {
|
||||
itemIndex: i,
|
||||
description: error?.description,
|
||||
description: error.description,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -293,9 +297,9 @@ export async function execute(this: IExecuteFunctions): Promise<INodeExecutionDa
|
|||
returnData.push(...executionErrorData);
|
||||
continue;
|
||||
}
|
||||
throw new NodeOperationError(this.getNode(), error.message as string, {
|
||||
throw new NodeOperationError(this.getNode(), error as Error, {
|
||||
itemIndex: job.i,
|
||||
description: error?.description,
|
||||
description: error.description,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue