(jobMetadata: any)
| 622 | } |
| 623 | |
| 624 | function createBigQueryError(jobMetadata: any): IBigQueryError { |
| 625 | const error: IBigQueryError = new Error(jobMetadata.status.errorResult.message); |
| 626 | if (jobMetadata.jobReference && jobMetadata.jobReference.jobId) { |
| 627 | error.metadata = { |
| 628 | bigquery: { |
| 629 | jobId: jobMetadata.jobReference.jobId, |
| 630 | } |
| 631 | }; |
| 632 | } |
| 633 | return error; |
| 634 | } |