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 88use Aws \Middleware ;
99use Aws \ResultInterface ;
1010use Closure ;
11- use Error ;
1211use GuzzleHttp \Promise ;
1312use OpenTelemetry \API \Instrumentation \InstrumentationInterface ;
1413use OpenTelemetry \API \Instrumentation \InstrumentationTrait ;
1817use OpenTelemetry \API \Trace \TracerProviderInterface ;
1918use OpenTelemetry \Context \Propagation \TextMapPropagatorInterface ;
2019use Psr \Http \Message \RequestInterface ;
20+ use Stringable ;
2121use Throwable ;
2222
2323/**
@@ -197,10 +197,10 @@ private function normalizeReason(mixed $reason): ?string
197197 return $ reason ->getMessage ();
198198 }
199199
200- try {
201- return strval ($ reason );
202- } catch (Error ) {
200+ if (is_object ($ reason ) && ! $ reason instanceof Stringable) {
203201 return null ;
204202 }
203+
204+ return (string ) $ reason ;
205205 }
206206}
You can’t perform that action at this time.
0 commit comments