Closed
Description
you should change this code:
return APIResponse::create([
'action' => Action::parse(json_decode((string)$response->getBody())->action)
], $response->getHeaders());
on this:
$payload = json_decode((string)$response->getBody());
return APIResponse::create(array_merge([
'action' => Action::parse($payload->action),
], (property_exists($payload, 'root_password')) ? ['root_password' => $payload->root_password] : []
), $response->getHeaders());
Metadata
Metadata
Assignees
Labels
No labels