try {
    $certificate_data = json_app_get($device, $name, 1)['data'];
} catch (JsonAppMissingKeysException $e) {
    $certificate_data = $e->getParsedJson();
} catch (JsonAppException $e) {