mirror of
https://github.com/Icinga/icingadb-web.git
synced 2026-05-28 04:36:06 -04:00
ApiCommandTransport: Fix error handling
This commit is contained in:
parent
5aca577d45
commit
82e86b3c14
1 changed files with 8 additions and 0 deletions
|
|
@ -238,6 +238,14 @@ class ApiCommandTransport implements CommandTransportInterface
|
|||
}
|
||||
|
||||
if (! isset($responseData['results']) || empty($responseData['results'])) {
|
||||
if (isset($responseData['error'])) {
|
||||
throw new ApiCommandException(
|
||||
'Can\'t send external Icinga command: %u %s',
|
||||
$responseData['error'],
|
||||
$responseData['status']
|
||||
);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue