@@ -168,7 +168,7 @@ public function handleDeclinedOrCanceled($params, $context): array
168168 }
169169 }
170170
171- protected function transitionOrderState ($ externalReferenceId , $ state , $ context , $ monduId = null ): StateMachineStateCollection
171+ protected function transitionOrderState ($ externalReferenceId , $ state , $ context , $ monduId = null ): ? StateMachineStateCollection
172172 {
173173 try {
174174 return $ this ->stateMachineRegistry ->transition (new Transition (
@@ -177,15 +177,13 @@ protected function transitionOrderState($externalReferenceId, $state, $context,
177177 $ state ,
178178 'stateId '
179179 ), $ context );
180- } catch (MonduException $ e ) {
181- throw $ e ;
182180 } catch (\Exception $ e ) {
183181 $ this ->log ('transitionOrderState Failed ' , [$ externalReferenceId , $ state ], $ e );
184- throw new MonduException ( $ e -> getMessage ()) ;
182+ return null ;
185183 }
186184 }
187185
188- protected function transitionDeliveryState ($ externalReferenceId , $ state , $ context , $ monduId = null ): StateMachineStateCollection
186+ protected function transitionDeliveryState ($ externalReferenceId , $ state , $ context , $ monduId = null ): ? StateMachineStateCollection
189187 {
190188 try {
191189 $ criteria = new Criteria ([$ this ->getOrderUuid ($ externalReferenceId , $ context , $ monduId )]);
@@ -201,11 +199,9 @@ protected function transitionDeliveryState($externalReferenceId, $state, $contex
201199 $ state ,
202200 'stateId '
203201 ), $ context );
204- } catch (MonduException $ e ) {
205- throw $ e ;
206202 } catch (\Exception $ e ) {
207203 $ this ->log ('transitionDeliveryState Failed ' , [$ externalReferenceId , $ state ], $ e );
208- throw new MonduException ( $ e -> getMessage ()) ;
204+ return null ;
209205 }
210206 }
211207
0 commit comments