File tree 1 file changed +12
-2
lines changed
src/Symfony/Component/Messenger/Bridge/AmazonSqs/Transport
1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 11
11
12
12
namespace Symfony \Component \Messenger \Bridge \AmazonSqs \Transport ;
13
13
14
+ use AsyncAws \Core \Exception \Http \HttpException ;
14
15
use Symfony \Component \Messenger \Envelope ;
16
+ use Symfony \Component \Messenger \Exception \TransportException ;
15
17
use Symfony \Component \Messenger \Transport \Serialization \PhpSerializer ;
16
18
use Symfony \Component \Messenger \Transport \Serialization \SerializerInterface ;
17
19
use Symfony \Component \Messenger \Transport \SetupableTransportInterface ;
@@ -71,12 +73,20 @@ public function send(Envelope $envelope): Envelope
71
73
*/
72
74
public function setup (): void
73
75
{
74
- $ this ->connection ->setup ();
76
+ try {
77
+ $ this ->connection ->setup ();
78
+ } catch (HttpException $ e ) {
79
+ throw new TransportException ($ e ->getMessage (), 0 , $ e );
80
+ }
75
81
}
76
82
77
83
public function reset ()
78
84
{
79
- $ this ->connection ->reset ();
85
+ try {
86
+ $ this ->connection ->setup ();
87
+ } catch (HttpException $ e ) {
88
+ throw new TransportException ($ e ->getMessage (), 0 , $ e );
89
+ }
80
90
}
81
91
82
92
private function getReceiver (): AmazonSqsReceiver
You can’t perform that action at this time.
0 commit comments