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 netroy committed Aug 17, 2023
1 parent 6a787dd commit 261d73e
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const properties: INodeProperties[] = [
},
},
{
displayName: 'Location',
displayName: 'Location (Region)',
name: 'location',
type: 'string',
default: '',
Expand Down Expand Up @@ -245,9 +245,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 @@ -290,9 +294,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 261d73e

Please sign in to comment.