File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
src/LaunchDarkly/Impl/Integrations Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 44
55namespace LaunchDarkly \Impl \Integrations ;
66
7+ use Exception ;
78use GuzzleHttp \Client ;
89use GuzzleHttp \Exception \BadResponseException ;
910use GuzzleHttp \HandlerStack ;
@@ -75,6 +76,9 @@ public function getFeature(string $key): ?FeatureFlag
7576 $ this ->handleUnexpectedStatus ($ code , "GuzzleFeatureRequester::get " );
7677 }
7778 return null ;
79+ } catch (Exception $ e ) {
80+ $ this ->_logger ->error ("GuzzleFeatureRequester::get encountered an exception retrieving flag key {$ key }: " . $ e ->getMessage ());
81+ return null ;
7882 }
7983 }
8084
@@ -99,6 +103,9 @@ public function getSegment(string $key): ?Segment
99103 $ this ->handleUnexpectedStatus ($ code , "GuzzleFeatureRequester::get " );
100104 }
101105 return null ;
106+ } catch (Exception $ e ) {
107+ $ this ->_logger ->error ("GuzzleFeatureRequester::get encountered an exception retrieving segment key {$ key }: " . $ e ->getMessage ());
108+ return null ;
102109 }
103110 }
104111
@@ -117,6 +124,9 @@ public function getAllFeatures(): ?array
117124 /** @psalm-suppress PossiblyNullReference (resolved in guzzle 7) */
118125 $ this ->handleUnexpectedStatus ($ e ->getResponse ()->getStatusCode (), "GuzzleFeatureRequester::getAll " );
119126 return null ;
127+ } catch (Exception $ e ) {
128+ $ this ->_logger ->error ("GuzzleFeatureRequester::getAll encountered an exception retrieving all flags: " . $ e ->getMessage ());
129+ return null ;
120130 }
121131 }
122132
You can’t perform that action at this time.
0 commit comments