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

Api4 - Display sql errors in explorer #16641

Merged
merged 2 commits into from
Feb 27, 2020

Conversation

colemanw
Copy link
Member

@colemanw colemanw commented Feb 27, 2020

Overview

Fixes display of debug info in Api4 Explorer.

Before

No sql shown for db_errors. And due to a json_encode problem, sometimes would show nothing at all.

After

Correctly shows backtrace & full sql for db_errors.

image

@civibot
Copy link

civibot bot commented Feb 27, 2020

(Standard links)

@civibot civibot bot added the master label Feb 27, 2020
@colemanw
Copy link
Member Author

@eileenmcnaughton test failures not related

*
* @return array|int
*/
function civicrm_api(string $entity, string $action, array $params, $extra = NULL) {
return \Civi::service('civi_api_kernel')->runSafe($entity, $action, $params, $extra);
function civicrm_api(string $entity, string $action, array $params) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to search a bit for this but it does seem to have been some early on idea that didn't take off & it's not used in runSafe

@eileenmcnaughton eileenmcnaughton merged commit 9022b45 into civicrm:master Feb 27, 2020
@eileenmcnaughton eileenmcnaughton deleted the apiError branch February 27, 2020 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants