Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.x] Use standard InvalidArgumentException when json_encode() failed #36868

Merged
merged 3 commits into from
Apr 4, 2021

Conversation

crynobone
Copy link
Member

@crynobone crynobone commented Apr 4, 2021

We already throwing the same error https://github.com/laravel/framework/blob/8.x/src/Illuminate/Http/JsonResponse.php#L75

At first, considered using JSON_THROW_ON_ERROR but it would be weird to throw a different exception on different classes (See above). We should definitely revisit this for 9.x release.

Signed-off-by: Mior Muhammad Zaki [email protected]

@taylorotwell taylorotwell merged commit c1fad5d into laravel:8.x Apr 4, 2021
@crynobone crynobone deleted the json-error branch April 5, 2021 09:23
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