From 28c19a79d33e8001b52ee5ed9adef877c54c411c Mon Sep 17 00:00:00 2001 From: MickLesk Date: Mon, 26 Jan 2026 20:48:17 +0100 Subject: [PATCH] feat(exit-codes): add systemd and build error codes (150-154) - 150: Systemd service failed to start - 151: Systemd service unit not found - 152: Permission denied (EACCES) - 153: Build/compile failed (make/gcc/cmake) - 154: Node.js native addon build failed (node-gyp) Based on issue analysis: 57 service failures, 25 build failures, 22 node-gyp issues --- misc/api.func | 8 ++++++++ misc/error_handler.func | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/misc/api.func b/misc/api.func index e8b4621b1..ad46c9986 100644 --- a/misc/api.func +++ b/misc/api.func @@ -39,6 +39,7 @@ # * Generic/Shell errors (1, 2, 124, 126-130, 134, 137, 139, 141, 143) # * curl/wget errors (6, 7, 22, 28, 35) # * Package manager errors (APT, DPKG: 100-102, 255) +# * Systemd/Service errors (150-154) # * Python/pip/uv errors (160-162) # * PostgreSQL errors (170-173) # * MySQL/MariaDB errors (180-183) @@ -79,6 +80,13 @@ explain_exit_code() { 141) echo "Broken pipe (SIGPIPE - output closed prematurely)" ;; 143) echo "Terminated (SIGTERM)" ;; + # --- Systemd / Service errors (150-154) --- + 150) echo "Systemd: Service failed to start" ;; + 151) echo "Systemd: Service unit not found" ;; + 152) echo "Permission denied (EACCES)" ;; + 153) echo "Build/compile failed (make/gcc/cmake)" ;; + 154) echo "Node.js: Native addon build failed (node-gyp)" ;; + # --- Python / pip / uv (160-162) --- 160) echo "Python: Virtualenv / uv environment missing or broken" ;; 161) echo "Python: Dependency resolution failed" ;; diff --git a/misc/error_handler.func b/misc/error_handler.func index 0e848cbf5..81da1ffb2 100644 --- a/misc/error_handler.func +++ b/misc/error_handler.func @@ -32,6 +32,7 @@ # * Generic/Shell errors (1, 2, 124, 126-130, 134, 137, 139, 141, 143) # * curl/wget errors (6, 7, 22, 28, 35) # * Package manager errors (APT, DPKG: 100-102, 255) +# * Systemd/Service errors (150-154) # * Python/pip/uv errors (160-162) # * PostgreSQL errors (170-173) # * MySQL/MariaDB errors (180-183) @@ -66,6 +67,13 @@ explain_exit_code() { 141) echo "Broken pipe (SIGPIPE - output closed prematurely)" ;; 143) echo "Terminated (SIGTERM)" ;; + # --- Systemd / Service errors (150-154) --- + 150) echo "Systemd: Service failed to start" ;; + 151) echo "Systemd: Service unit not found" ;; + 152) echo "Permission denied (EACCES)" ;; + 153) echo "Build/compile failed (make/gcc/cmake)" ;; + 154) echo "Node.js: Native addon build failed (node-gyp)" ;; + # --- Node.js / npm / pnpm / yarn (243-249) --- 243) echo "Node.js: Out of memory (JavaScript heap out of memory)" ;; 245) echo "Node.js: Invalid command-line option" ;;