File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -357,20 +357,22 @@ private function getResolveStatus(): bool
357357 $ this ->resolveResult = new $ class (...$ args );
358358 }
359359
360+ $ message = null ;
361+ $ context = ['exception ' => $ this ->resolveResult ];
360362 if ($ this ->resolveResult instanceof HttpException) {
361363 /** @var int $code */
362364 $ code = $ this ->httpResponse ->getInfo ('http_code ' );
363365 /** @var string $url */
364366 $ url = $ this ->httpResponse ->getInfo ('url ' );
365- $ this ->logger ->error (sprintf ('HTTP %d returned for "%s". ' , $ code , $ url ), [
366- 'aws_code ' => $ this ->resolveResult ->getAwsCode (),
367- 'aws_message ' => $ this ->resolveResult ->getAwsMessage (),
368- 'aws_type ' => $ this ->resolveResult ->getAwsType (),
369- 'aws_detail ' => $ this ->resolveResult ->getAwsDetail (),
370- ]);
367+ $ context ['aws_code ' ] = $ this ->resolveResult ->getAwsCode ();
368+ $ context ['aws_message ' ] = $ this ->resolveResult ->getAwsMessage ();
369+ $ context ['aws_type ' ] = $ this ->resolveResult ->getAwsType ();
370+ $ context ['aws_detail ' ] = $ this ->resolveResult ->getAwsDetail ();
371+ $ message = sprintf ('HTTP %d returned for "%s". ' , $ code , $ url );
371372 }
372373
373374 if ($ this ->resolveResult instanceof Exception) {
375+ $ this ->logger ->error ($ message ?? $ this ->resolveResult ->getMessage (), $ context );
374376 $ this ->didThrow = true ;
375377
376378 throw $ this ->resolveResult ;
You can’t perform that action at this time.
0 commit comments