fleetbo-cockpit-cli 1.0.7 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/cli.js +7 -1
  2. package/package.json +1 -1
package/cli.js CHANGED
@@ -362,6 +362,12 @@ else if (command === 'android' || command === 'ios') {
362
362
  process.stdout.write(`\x1b[32mOK\x1b[0m\n\n`);
363
363
  } catch (preflightError) {
364
364
  process.stdout.write(`\x1b[31mDENIED\x1b[0m\n`);
365
+
366
+ // 🟢 AJOUT CRITIQUE : On capture le message d'erreur du Cloud (JSON)
367
+ if (preflightError.response && preflightError.response.data && preflightError.response.data.error) {
368
+ // On remplace l'erreur technique Axios par le message métier clair
369
+ throw new Error(preflightError.response.data.error);
370
+ }
365
371
  // Fait sauter le code directement au "catch" global du bas sans jamais builder
366
372
  throw preflightError;
367
373
  }
@@ -445,7 +451,7 @@ else if (command === 'android' || command === 'ios') {
445
451
  throw new Error(axiosError.response.data.error);
446
452
  } else {
447
453
  // Timeout ou erreur réseau pure
448
- throw new Error(`Connection to Factory failed: ${axiosError.message}`);
454
+ throw new Error(`Connection to OS failed: ${axiosError.message}`);
449
455
  }
450
456
  }
451
457
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fleetbo-cockpit-cli",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "Fleetbo CLI - Build native mobile apps with React",
5
5
  "author": "Fleetbo",
6
6
  "license": "MIT",