File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,7 @@ public function handle(): void
7575 $ this ->preUpdateCode = $ this ->site ->getFrontendStatus ();
7676 } catch (RequestException $ e ) {
7777 // Catch request exceptions - they should not stop the process
78+ $ this ->preUpdateCode = $ e ->getResponse ()->getStatusCode ();
7879 }
7980
8081 // Let site fetch available updates
@@ -117,7 +118,14 @@ public function handle(): void
117118 }
118119
119120 // Compare codes
120- if ($ this ->site ->getFrontendStatus () !== $ this ->preUpdateCode ) {
121+ try {
122+ $ afterUpdateCode = $ this ->site ->getFrontendStatus ();
123+ } catch (RequestException $ e ) {
124+ // Again, do not fetch exceptions
125+ $ afterUpdateCode = $ e ->getResponse ()->getStatusCode ();
126+ }
127+
128+ if ($ afterUpdateCode !== $ this ->preUpdateCode ) {
121129 throw new UpdateException (
122130 "afterUpdate " ,
123131 "Status code has changed after update for site: " . $ this ->site ->id
You can’t perform that action at this time.
0 commit comments