File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,13 @@ public function page(int $no = 1): void
8888 $ this ->retrieved [$ tseId ] = $ rowData ;
8989 });
9090 } catch (Throwable $ e ) {
91- $ html = $ this ->browser ->getResponse ()->getContent ();
91+ $ html = null ;
92+ try {
93+ $ html = $ this ->browser ->getResponse ()->getContent ();
94+ } catch (Throwable ) {
95+ // No response available (request failed before completion)
96+ // This is expected when the initial request() call fails
97+ }
9298 throw (new RetrieveException ($ e ->getMessage (), $ e ->getCode (), $ e ->getPrevious ()))
9399 ->addContext ($ url , $ html );
94100 }
Original file line number Diff line number Diff line change 22
33use Rechtlogisch \TseId \Retrieve ;
44
5- $ retrieve = ( function () {
5+ $ retrieve = function () {
66 return new Retrieve ;
7- })() ;
7+ };
88
99it ('retrieve data from BSI website ' , function () use (&$ retrieve ) {
10- $ list = $ retrieve ->list ();
10+ $ list = $ retrieve() ->list ();
1111 expect ($ list )
1212 ->toBeArray ()
1313 ->not ->toBeEmpty ()
You can’t perform that action at this time.
0 commit comments