File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -317,7 +317,7 @@ Job.prototype.getQueryResultsStream = function(options) {
317317 */
318318Job . prototype . poll_ = function ( callback ) {
319319 this . getMetadata ( function ( err , metadata , apiResponse ) {
320- if ( apiResponse . status && apiResponse . status . errors ) {
320+ if ( ! err && apiResponse . status && apiResponse . status . errors ) {
321321 err = common . util . ApiError ( apiResponse . status ) ;
322322 }
323323
Original file line number Diff line number Diff line change @@ -277,11 +277,10 @@ describe('BigQuery/Job', function() {
277277
278278 describe ( 'API error' , function ( ) {
279279 var error = new Error ( 'Error.' ) ;
280- var apiResponse = { } ;
281280
282281 beforeEach ( function ( ) {
283282 job . getMetadata = function ( callback ) {
284- callback ( error , null , apiResponse ) ;
283+ callback ( error ) ;
285284 } ;
286285 } ) ;
287286
You can’t perform that action at this time.
0 commit comments