Fixed: Log error in member request
This commit is contained in:
parent
f162e58ed5
commit
d22adb0e09
11
src/Api.php
11
src/Api.php
|
@ -110,17 +110,16 @@ class Api {
|
||||||
$url = self::$url.'/ica/rest/nami/mitglied/filtered-for-navigation/gruppierung/gruppierung/'.$groupId.'/'.$memberId;
|
$url = self::$url.'/ica/rest/nami/mitglied/filtered-for-navigation/gruppierung/gruppierung/'.$groupId.'/'.$memberId;
|
||||||
$response = $this->http()->get($url);
|
$response = $this->http()->get($url);
|
||||||
|
|
||||||
Log::debug('Member Request '.$memberId, [
|
if ($response->status() == 200) {
|
||||||
'url' => $url,
|
Log::debug('Member Request '.$memberId, [ 'url' => $url, 'response' => $response->body(), 'json' => $response->json(), 'memberId' => $memberId ]);
|
||||||
'response' => $response->body(),
|
} else {
|
||||||
'json' => $response->json()
|
Log::error('Member Request '.$memberId, [ 'url' => $url, 'response' => $response->body(), 'json' => $response->json(), 'memberId' => $memberId ]);
|
||||||
]);
|
}
|
||||||
|
|
||||||
if ($response->json()['success'] === true) {
|
if ($response->json()['success'] === true) {
|
||||||
return $response->json()['data'];
|
return $response->json()['data'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(Str::startsWith($response['message'], 'Access denied')) {
|
if(Str::startsWith($response['message'], 'Access denied')) {
|
||||||
return $this->singleMemberFallback($groupId, $memberId);
|
return $this->singleMemberFallback($groupId, $memberId);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue