Skip to content

Return 500 http error, instead of 200, when dotenv fails to load - #45235

Merged
taylorotwell merged 2 commits into
laravel:9.xfrom
cosminardeleanu:patch-1
Dec 9, 2022
Merged

taylorotwell merged 2 commits into
laravel:9.xfrom
cosminardeleanu:patch-1

Conversation

@cosminardeleanu

Copy link
Copy Markdown
Contributor

When dotenv fails, the response on http is always 200.

Because of 200 response, alerts might not be triggered, and data will be cached with whatever laravel decides to output.

When dotenv fails, the response on http is always 200.

Because of 200 response, alerts might not be triggered, and data will be cached :(
@GrahamCampbell

Copy link
Copy Markdown
Collaborator

I wonder if we'd be better to just throw the exception and have things crash in the usual way.

@taylorotwell
taylorotwell merged commit 1c10e4f into laravel:9.x Dec 9, 2022
@cosminardeleanu
cosminardeleanu deleted the patch-1 branch December 10, 2022 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants