Enhance error handling in gateway and configuration
Publish telemt-api gateway Docker image / test (push) Successful in 24s
Publish telemt-api gateway Docker image / build-and-push (push) Successful in 2m6s

- Added `expose_upstream_errors` option to the configuration, allowing detailed error messages in JSON responses for 502 errors.
- Implemented `writeBadGatewayJSON` function to streamline JSON error responses, including upstream error details when enabled.
- Updated documentation to reflect changes in configuration and error handling behavior for improved diagnostics.
This commit is contained in:
Denozordec
2026-03-31 14:30:15 +07:00
parent deb12e72c0
commit 8bf4bb7f35
4 changed files with 36 additions and 14 deletions
+4
View File
@@ -8,6 +8,10 @@
listen: ":8080"
# Диагностика: при 502 от прокси в JSON добавляется error.detail с текстом ошибки RoundTrip (TLS, DNS, таймаут).
# Включайте только во внутренней сети — строка может содержать хосты/порты upstream.
# expose_upstream_errors: true
# If true, IP whitelist is not enforced (development only).
allow_all: false