@@ -314,8 +314,7 @@ export class GitHubGlue {
314314
315315 response . data . map ( ( pr ) => {
316316 if ( ! pr . user || ! pr . base . repo . owner ) {
317- throw new Error ( `PR ${ pr . number } is missing information. ${
318- pr . toString ( ) } `) ;
317+ throw new Error ( `PR ${ pr . number } is missing information.\n${ JSON . stringify ( pr , null , 2 ) } ` ) ;
319318 }
320319
321320 result . push ( {
@@ -351,8 +350,8 @@ export class GitHubGlue {
351350
352351 const pullRequest = response . data ;
353352 if ( ! pullRequest . user ) {
354- throw new Error ( `PR ${ pullRequest . number } is missing information. ${
355- pullRequest . toString ( ) } `) ;
353+ throw new Error ( `PR ${ pullRequest . number } is missing information.\n ${
354+ JSON . stringify ( pullRequest , null , 2 ) } `) ;
356355 }
357356
358357 return {
@@ -390,8 +389,8 @@ export class GitHubGlue {
390389 const prNumber = match ? parseInt ( match [ 1 ] , 10 ) : - 1 ;
391390
392391 if ( ! response . data . user ) {
393- throw new Error ( `PR ${ prNumber } comment is missing information. ${
394- response . data . toString ( ) } `) ;
392+ throw new Error ( `PR ${ prNumber } comment is missing information.\n ${
393+ JSON . stringify ( response . data , null , 2 ) } `) ;
395394 }
396395
397396 return {
@@ -418,8 +417,7 @@ export class GitHubGlue {
418417 const result : IPRCommit [ ] = [ ] ;
419418 response . data . map ( ( cm ) => {
420419 if ( ! cm . commit . committer || ! cm . commit . author || ! cm . sha ) {
421- throw new Error ( `Commit information missing for PR ${
422- prNumber } - ${ cm . toString ( ) } `) ;
420+ throw new Error ( `Commit information missing for PR ${ prNumber } :\n${ JSON . stringify ( cm , null , 2 ) } ` ) ;
423421 }
424422
425423 const committer = cm . commit . committer ;
0 commit comments