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

Does not display query if exception is thrown #2

Open
harveyslash opened this issue Jun 9, 2016 · 3 comments
Open

Does not display query if exception is thrown #2

harveyslash opened this issue Jun 9, 2016 · 3 comments

Comments

@harveyslash
Copy link

First of all, great package, thanks !

I noticed a problem though.
if an error is caught like so:
catch ( QueryException $e) {
$mssg = "An account with these details already exists";
return response()->json(["error_list" => compact('mssg')]);
}

the sql key inside debug is blank.
any way to fix this ?

@mlanin
Copy link
Owner

mlanin commented Jun 14, 2016

Thanks for info, never encountered such bug. Let me debug a bit and I'll let you know

@mlanin
Copy link
Owner

mlanin commented Feb 21, 2017

@harveyslash sorry for the delay. Can you show me the whole code example?

@spacedog4
Copy link
Contributor

I'm having almost the same issue, but in my case I don't catch the error, I throw exceptions and want the code to strop there, so I don't need to return this exception, but the debug obj don't return with the exception

$json_response = response()->json($response, $this->getStatusCode(), $headers);
throw new HttpResponseException($json_response);

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

No branches or pull requests

3 participants