laravel-api-debugger
laravel-api-debugger copied to clipboard
Does not display query if exception is thrown
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 ?
Thanks for info, never encountered such bug. Let me debug a bit and I'll let you know
@harveyslash sorry for the delay. Can you show me the whole code example?
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);