mirror of
https://github.com/tuxis-ie/nsedit.git
synced 2025-04-19 20:09:14 +03:00
commit
96c063ac72
1 changed files with 3 additions and 0 deletions
|
@ -62,6 +62,9 @@ function api_request($path, $opts = null, $type = null) {
|
||||||
if (isset($json['error'])) {
|
if (isset($json['error'])) {
|
||||||
jtable_respond(null, 'error', "API Error $code: ".$json['error']);
|
jtable_respond(null, 'error', "API Error $code: ".$json['error']);
|
||||||
} elseif ($code < 200 || $code >= 300) {
|
} elseif ($code < 200 || $code >= 300) {
|
||||||
|
if ($code == 401) {
|
||||||
|
$code = "Authentication failed. Have you configured your authmethod correct?";
|
||||||
|
}
|
||||||
jtable_respond(null, 'error', "API Error: $code");
|
jtable_respond(null, 'error', "API Error: $code");
|
||||||
}
|
}
|
||||||
return $json;
|
return $json;
|
||||||
|
|
Loading…
Add table
Reference in a new issue