Please bring back MaintenanceModeException #41497
Unanswered
kristijorgji
asked this question in
Ideas
Replies: 1 comment 3 replies
-
The |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all, the discussion is here and closed without being fixed
#35635
To summarize the issue is that
MaintenanceModeException
is not thrown anymore at laravel >=8.x and instead HttpClientException is thrown. So far so good who cares, if$exception->getStatusCode() === 503
is maintenance mode we can handle this in ourHandler.php@report
method and return properly nice json if api or whatever we want.Now problem is:
the previous exception MaintenanceModeException exposed very useful fields
willBeAvailableAt
wentDownAt
retryAfter
which are not available in HttpClientException
My request here is to bring back those fields either in HttpClientException somehow, or just return back MaintenanceModeException because in my opinion as developer makes total sense. Has concrete name of exception time and information that we use to nicely display user modal/ui with exact time of maitenance.
Here is new exception with status code 503 replacing previous one. No information at all aside 503 status code
In addition the
php artisan down
command now generates a file atstorage/framework/maintenance.php
that is never called or used so looks redundant to me (was not created in pre 8.x versions. Before only json file storage/framework/down was created and used also storing the info of when again available etc ).Beta Was this translation helpful? Give feedback.
All reactions