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

Exception handler should return json response on ajax call #536

Merged
merged 1 commit into from
Feb 13, 2020
Merged

Exception handler should return json response on ajax call #536

merged 1 commit into from
Feb 13, 2020

Conversation

yanhao-li
Copy link

Using Illuminate\Foundation\Exceptions\Handler to handle the json response.

Sample responses:

app.debug === true:

message: "Target class [App\Repositories\ArticleRepository] does not exist."
exception: "Illuminate\Contracts\Container\BindingResolutionException"
file: ".../vendor/laravel/framework/src/Illuminate/Container/Container.php"
line: 805
trace: [,…]

app.debug === false:

message: "Server Error"

@ifox ifox merged commit dec4714 into area17:master Feb 13, 2020
antonioribeiro pushed a commit to antonioribeiro/twill that referenced this pull request Feb 19, 2020
@yanhao-li yanhao-li deleted the fix/ajax-exception branch April 6, 2020 13:35
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.

2 participants