@oss-autopilot/core 1.7.1 → 1.9.0

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.
@@ -8,13 +8,13 @@
8
8
  * Heavy command modules are lazy-loaded via dynamic import() in action handlers
9
9
  * so that only the invoked command's dependencies are evaluated.
10
10
  */
11
- import { errorMessage } from './core/errors.js';
11
+ import { errorMessage, resolveErrorCode } from './core/errors.js';
12
12
  import { outputJson, outputJsonError } from './formatters/json.js';
13
13
  /** Shared error handler for CLI action catch blocks. */
14
14
  function handleCommandError(err, json) {
15
15
  const msg = errorMessage(err);
16
16
  if (json) {
17
- outputJsonError(msg);
17
+ outputJsonError(msg, resolveErrorCode(err));
18
18
  }
19
19
  else {
20
20
  console.error(`Error: ${msg}`);