File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -60,8 +60,8 @@ export class Request {
6060 this . logger . debug ( colorize ( "bold" , JSON . stringify ( responseJSON , null , 4 ) ) )
6161 }
6262
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 ( ) } ` )
6565 }
6666
6767 private async _fetchWithLogging (
@@ -115,7 +115,7 @@ export class Request {
115115 try {
116116 json = await response . clone ( ) . json ( )
117117 } catch ( e ) {
118- this . _logInvalidJSON ( response )
118+ await this . _logInvalidJSON ( response )
119119
120120 throw new ResponseError ( response , `invalid json: ${ json } ` , e )
121121 }
@@ -139,7 +139,7 @@ export class Request {
139139 throw new ResponseError ( response , "record not found" )
140140 } else {
141141 // Bad JSON, for instance an errors payload
142- this . _logInvalidJSON ( response )
142+ await this . _logInvalidJSON ( response )
143143 throw new ResponseError ( response , "invalid json" )
144144 }
145145 }
You can’t perform that action at this time.
0 commit comments