We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4ebe5da commit 5e3e540Copy full SHA for 5e3e540
src/bigquery.ts
@@ -2331,11 +2331,9 @@ export class BigQueryInt extends Number {
2331
try {
2332
return this.typeCastFunction!(this.value);
2333
} catch (error) {
2334
- (
2335
- error as Error
2336
- ).message = `integerTypeCastFunction threw an error:\n\n - ${
2337
- (error as Error).message
2338
- }`;
+ if (error instanceof Error) {
+ error.message = `integerTypeCastFunction threw an error:\n\n - ${error.message}`;
+ }
2339
throw error;
2340
}
2341
} else {
0 commit comments