fix(api.func): fix duplicate exit codes and add missing error codes

Exit code fixes:
- Remove duplicate definitions for codes 243, 254 (Node.js vs DB)
- Reassign MySQL/MariaDB to 240-242, 244 (was 241-244)
- Reassign MongoDB to 250-253 (was 251-254)

New exit codes added (based on GitHub issues analysis):
- 6: curl couldn't resolve host (DNS failure)
- 7: curl failed to connect (network unreachable)
- 22: curl HTTP error (404, 429 rate limit, 500)
- 28: curl timeout (very common in download failures)
- 35: curl SSL error
- 102: APT lock held by another process
- 124: Command timeout
- 141: SIGPIPE (broken pipe)

Also update OOM detection to include exit code 134 (SIGABRT)
which is commonly seen in Node.js heap overflow issues.

Fixes based on analysis of ~500 GitHub issues.
This commit is contained in:
MickLesk
2026-01-26 20:23:04 +01:00
parent 93cb6f99fe
commit e731b9fb65
2 changed files with 38 additions and 22 deletions
+2 -2
View File
@@ -3978,8 +3978,8 @@ EOF'
error_explanation="$(explain_exit_code "$install_exit_code")"
fi
# OOM detection: exit codes 137 (SIGKILL/OOM) and 243 (Node.js heap)
if [[ $install_exit_code -eq 137 || $install_exit_code -eq 243 ]]; then
# OOM detection: exit codes 134 (SIGABRT/heap), 137 (SIGKILL/OOM), 243 (Node.js heap)
if [[ $install_exit_code -eq 134 || $install_exit_code -eq 137 || $install_exit_code -eq 243 ]]; then
is_oom=true
fi