Skip to content

Commit

Permalink
fix(Google BigQuery Node): Error description improvement (#6715)
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-radency authored and OlegIvaniv committed Aug 3, 2023
1 parent 77a7d76 commit 5196f37
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ const properties: INodeProperties[] = [
},
},
{
displayName: 'Location',
displayName: 'Location (Region)',
name: 'location',
type: 'string',
default: '',
Expand Down Expand Up @@ -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,
});
}
}
Expand Down Expand Up @@ -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,
});
}
}
Expand Down

0 comments on commit 5196f37

Please sign in to comment.