File tree 1 file changed +4
-4
lines changed 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -60,8 +60,8 @@ export class Request {
60
60
this . logger . debug ( colorize ( "bold" , JSON . stringify ( responseJSON , null , 4 ) ) )
61
61
}
62
62
63
- private _logInvalidJSON ( response : Response ) : void {
64
- this . logger . debug ( `Invalid Response JSON: ${ response . clone ( ) . text ( ) } ` )
63
+ private async _logInvalidJSON ( response : Response ) {
64
+ this . logger . debug ( `Invalid Response JSON: ${ await response . clone ( ) . text ( ) } ` )
65
65
}
66
66
67
67
private async _fetchWithLogging (
@@ -115,7 +115,7 @@ export class Request {
115
115
try {
116
116
json = await response . clone ( ) . json ( )
117
117
} catch ( e ) {
118
- this . _logInvalidJSON ( response )
118
+ await this . _logInvalidJSON ( response )
119
119
120
120
throw new ResponseError ( response , `invalid json: ${ json } ` , e )
121
121
}
@@ -139,7 +139,7 @@ export class Request {
139
139
throw new ResponseError ( response , "record not found" )
140
140
} else {
141
141
// Bad JSON, for instance an errors payload
142
- this . _logInvalidJSON ( response )
142
+ await this . _logInvalidJSON ( response )
143
143
throw new ResponseError ( response , "invalid json" )
144
144
}
145
145
}
You can’t perform that action at this time.
0 commit comments