{"action":"created","issue":{"url":"https://api.github.com/repos/Icinga/icingaweb2-module-director/issues/1192","repository_url":"https://api.github.com/repos/Icinga/icingaweb2-module-director","labels_url":"https://api.github.com/repos/Icinga/icingaweb2-module-director/issues/1192/labels{/name}","comments_url":"https://api.github.com/repos/Icinga/icingaweb2-module-director/issues/1192/comments","events_url":"https://api.github.com/repos/Icinga/icingaweb2-module-director/issues/1192/events","html_url":"https://github.com/Icinga/icingaweb2-module-director/issues/1192","id":258403200,"node_id":"MDU6SXNzdWUyNTg0MDMyMDA=","number":1192,"title":"Formatted error message instead of stacktrace when trying to delete used command","user":{"login":"sysadmama","id":11242139,"node_id":"MDQ6VXNlcjExMjQyMTM5","avatar_url":"https://avatars0.githubusercontent.com/u/11242139?v=4","gravatar_id":"","url":"https://api.github.com/users/sysadmama","html_url":"https://github.com/sysadmama","followers_url":"https://api.github.com/users/sysadmama/followers","following_url":"https://api.github.com/users/sysadmama/following{/other_user}","gists_url":"https://api.github.com/users/sysadmama/gists{/gist_id}","starred_url":"https://api.github.com/users/sysadmama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sysadmama/subscriptions","organizations_url":"https://api.github.com/users/sysadmama/orgs","repos_url":"https://api.github.com/users/sysadmama/repos","events_url":"https://api.github.com/users/sysadmama/events{/privacy}","received_events_url":"https://api.github.com/users/sysadmama/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/Icinga/icingaweb2-module-director/milestones/11","html_url":"https://github.com/Icinga/icingaweb2-module-director/milestone/11","labels_url":"https://api.github.com/repos/Icinga/icingaweb2-module-director/milestones/11/labels","id":2824610,"node_id":"MDk6TWlsZXN0b25lMjgyNDYxMA==","number":11,"title":"1.5.0","description":"","creator":{"login":"Thomas-Gelf","id":553008,"node_id":"MDQ6VXNlcjU1MzAwOA==","avatar_url":"https://avatars2.githubusercontent.com/u/553008?v=4","gravatar_id":"","url":"https://api.github.com/users/Thomas-Gelf","html_url":"https://github.com/Thomas-Gelf","followers_url":"https://api.github.com/users/Thomas-Gelf/followers","following_url":"https://api.github.com/users/Thomas-Gelf/following{/other_user}","gists_url":"https://api.github.com/users/Thomas-Gelf/gists{/gist_id}","starred_url":"https://api.github.com/users/Thomas-Gelf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Thomas-Gelf/subscriptions","organizations_url":"https://api.github.com/users/Thomas-Gelf/orgs","repos_url":"https://api.github.com/users/Thomas-Gelf/repos","events_url":"https://api.github.com/users/Thomas-Gelf/events{/privacy}","received_events_url":"https://api.github.com/users/Thomas-Gelf/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":121,"state":"closed","created_at":"2017-10-09T13:47:51Z","updated_at":"2018-09-05T19:27:43Z","due_on":"2018-08-13T07:00:00Z","closed_at":"2018-08-13T11:20:13Z"},"comments":0,"created_at":"2017-09-18T08:34:07Z","updated_at":"2018-09-05T19:27:42Z","closed_at":"2018-09-05T19:27:42Z","author_association":"CONTRIBUTOR","body":"When you try to delete a command which is currently in use by Service Template, an *Integrity constraint violation* stacktrace appears. It would be nice (and less shocking btw) to have a meaningful error message instead. \r\n\r\nCheers!\r\n\r\n## Stacktrace\r\n```\r\n#0 /usr/share/icingaweb2/library/vendor/Zend/Db/Statement.php(297): Zend_Db_Statement_Pdo->_execute(Array)\r\n#1 /usr/share/icingaweb2/library/vendor/Zend/Db/Adapter/Abstract.php(470): Zend_Db_Statement->execute(Array)\r\n#2 /usr/share/icingaweb2/library/vendor/Zend/Db/Adapter/Pdo/Abstract.php(232): Zend_Db_Adapter_Abstract->query('DELETE FROM ici...', Array)\r\n#3 /usr/share/icingaweb2/library/vendor/Zend/Db/Adapter/Abstract.php(652): Zend_Db_Adapter_Pdo_Abstract->query('DELETE FROM ici...')\r\n#4 /usr/share/icingaweb2/modules/director/library/Director/Data/Db/DbObject.php(820): Zend_Db_Adapter_Abstract->delete('icinga_command', '(id = 80)')\r\n#5 /usr/share/icingaweb2/modules/director/library/Director/Data/Db/DbObject.php(943): Icinga\\Module\\Director\\Data\\Db\\DbObject->deleteFromDb()\r\n#6 /usr/share/icingaweb2/modules/director/library/Director/Web/Form/DirectorObjectForm.php(842): Icinga\\Module\\Director\\Data\\Db\\DbObject->delete()\r\n#7 /usr/share/icingaweb2/modules/director/library/Director/Web/Form/DirectorObjectForm.php(776): Icinga\\Module\\Director\\Web\\Form\\DirectorObjectForm->deleteObject(Object(Icinga\\Module\\Director\\Objects\\IcingaCommand))\r\n#8 /usr/share/icingaweb2/modules/director/library/Director/Web/Form/DirectorObjectForm.php(762): Icinga\\Module\\Director\\Web\\Form\\DirectorObjectForm->handlePost()\r\n#9 /usr/share/icingaweb2/modules/director/library/Director/Web/Form/QuickForm.php(520): Icinga\\Module\\Director\\Web\\Form\\DirectorObjectForm->onRequest()\r\n#10 /usr/share/icingaweb2/modules/director/library/Director/Web/Form/QuickForm.php(532): Icinga\\Module\\Director\\Web\\Form\\QuickForm->setRequest(Object(Icinga\\Web\\Request))\r\n#11 /usr/share/icingaweb2/modules/director/library/Director/Web/Form/QuickForm.php(367): Icinga\\Module\\Director\\Web\\Form\\QuickForm->getRequest()\r\n#12 /usr/share/icingaweb2/modules/director/library/Director/Web/Controller/ObjectController.php(403): Icinga\\Module\\Director\\Web\\Form\\QuickForm->handleRequest()\r\n#13 /usr/share/icingaweb2/modules/director/library/Director/Web/Controller/ObjectController.php(112): Icinga\\Module\\Director\\Web\\Controller\\ObjectController->addObjectForm(Object(Icinga\\Module\\Director\\Objects\\IcingaCommand))\r\n#14 /usr/share/icingaweb2/modules/director/library/Director/Web/Controller/ObjectController.php(79): Icinga\\Module\\Director\\Web\\Controller\\ObjectController->editAction()\r\n#15 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(507): Icinga\\Module\\Director\\Web\\Controller\\ObjectController->indexAction()\r\n#16 /usr/share/icingaweb2/library/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch('indexAction')\r\n#17 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\\Web\\Controller\\Dispatcher->dispatch(Object(Icinga\\Web\\Request), Object(Icinga\\Web\\Response))\r\n#18 /usr/share/icingaweb2/library/Icinga/Application/Web.php(389): Zend_Controller_Front->dispatch(Object(Icinga\\Web\\Request), Object(Icinga\\Web\\Response))\r\n#19 /usr/share/icingaweb2/library/Icinga/Application/webrouter.php(104): Icinga\\Application\\Web->dispatch()\r\n#20 /usr/share/icingaweb2/public/index.php(4): require_once('/usr/share/icin...')\r\n#21 {main}\r\n```\r\n\r\n## Your Environment\r\n<!--- Include as many relevant details about the environment you experienced the problem in -->\r\n* Director version (System - About): f7353b66283ee3f11e15fd5d616a690ac7b72c4c\r\n* Icinga Web 2 version and modules (System - About): b7639651e80e85b81d9fb92c1db77e90c3754d2d\r\n* Icinga 2 version (`icinga2 --version`): r2.7.0-1\r\n* Operating System and version: Ubuntu-16.04\r\n* Webserver, PHP versions: apache2, php7\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Icinga/icingaweb2-module-director/issues/comments/418852628","html_url":"https://github.com/Icinga/icingaweb2-module-director/issues/1192#issuecomment-418852628","issue_url":"https://api.github.com/repos/Icinga/icingaweb2-module-director/issues/1192","id":418852628,"node_id":"MDEyOklzc3VlQ29tbWVudDQxODg1MjYyOA==","user":{"login":"Thomas-Gelf","id":553008,"node_id":"MDQ6VXNlcjU1MzAwOA==","avatar_url":"https://avatars2.githubusercontent.com/u/553008?v=4","gravatar_id":"","url":"https://api.github.com/users/Thomas-Gelf","html_url":"https://github.com/Thomas-Gelf","followers_url":"https://api.github.com/users/Thomas-Gelf/followers","following_url":"https://api.github.com/users/Thomas-Gelf/following{/other_user}","gists_url":"https://api.github.com/users/Thomas-Gelf/gists{/gist_id}","starred_url":"https://api.github.com/users/Thomas-Gelf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Thomas-Gelf/subscriptions","organizations_url":"https://api.github.com/users/Thomas-Gelf/orgs","repos_url":"https://api.github.com/users/Thomas-Gelf/repos","events_url":"https://api.github.com/users/Thomas-Gelf/events{/privacy}","received_events_url":"https://api.github.com/users/Thomas-Gelf/received_events","type":"User","site_admin":false},"created_at":"2018-09-05T19:27:42Z","updated_at":"2018-09-05T19:27:42Z","author_association":"CONTRIBUTOR","body":"This is no longer an issue with v1.5.x"}}
{"actor":{"display_login":"Thomas-Gelf"}}