IT-Service: /api/ex ergänzen, HTML-Antworten als Fehler, Kategorie und Standort Pflicht
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 3m35s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 3m32s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 3m54s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 3m53s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 5m1s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 5m17s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 4m31s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m11s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 4m33s
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 3m35s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 3m32s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 3m54s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 3m53s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 5m1s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 5m17s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 4m31s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m11s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 4m33s
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
df7ebfa6cd
commit
7969a7ac83
108 changed files with 525 additions and 445 deletions
|
|
@ -134,7 +134,16 @@ class Client
|
|||
*/
|
||||
private function json(Response $response): array
|
||||
{
|
||||
$data = (array) $response->json();
|
||||
$decoded = $response->json();
|
||||
|
||||
// Eine HTML-Seite (falsche Adresse, Anmeldeseite …) ist keine leere Liste.
|
||||
if ($response->successful() && ! is_array($decoded)) {
|
||||
Log::warning('OpenNIT lieferte keine JSON-Antwort', ['body' => mb_substr($response->body(), 0, 300)]);
|
||||
|
||||
throw new OpenNitException('Der IT-Service hat keine gültige API-Antwort geliefert. Bitte die API-Adresse prüfen (sie endet auf „/api/ex“).', 502);
|
||||
}
|
||||
|
||||
$data = (array) $decoded;
|
||||
|
||||
if (! $response->successful()) {
|
||||
Log::info("OpenNIT antwortete {$response->status()}", ['body' => mb_substr($response->body(), 0, 500)]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue