mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-31 01:34:12 +02:00
RestApiRespons: show part of the result on parse...
...errors
This commit is contained in:
parent
cdb92e18de
commit
34a38e1f32
@ -98,7 +98,12 @@ class RestApiResponse
|
|||||||
$result = @json_decode($json);
|
$result = @json_decode($json);
|
||||||
if ($result === null) {
|
if ($result === null) {
|
||||||
$this->setJsonError();
|
$this->setJsonError();
|
||||||
throw new IcingaException('Parsing JSON result failed: ' . $this->errorMessage);
|
// <h1>Bad Request</h1><p><pre>bad version</pre></p>
|
||||||
|
throw new IcingaException(
|
||||||
|
'Parsing JSON result failed: '
|
||||||
|
. $this->errorMessage
|
||||||
|
. ' (Got: ' . substr($json, 0, 60) . ')'
|
||||||
|
);
|
||||||
}
|
}
|
||||||
if (property_exists($result, 'error')) {
|
if (property_exists($result, 'error')) {
|
||||||
if (property_exists($result, 'status')) {
|
if (property_exists($result, 'status')) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user