Fix 502 errors on container restart and expand API authentication

- Handle 502 Gateway Timeout errors by clearing invalid sessions
- Add graceful session validation failure handling in fetch-thread API
- Expand x-tag authentication to accept additional valid token
- Add debug logging to berth-related API endpoints
- Document the 502 error fix in email system documentation
This commit is contained in:
2025-06-09 23:29:24 +02:00
parent 1866dfd010
commit 48cee6f849
8 changed files with 89 additions and 28 deletions

View File

@@ -51,6 +51,14 @@
- Changed `sendEmail` to `true` to ensure recipients receive signing emails
- Correctly extract signing URLs from the response
### 8. 502 Bad Gateway on Container Restart
- **Problem**: Getting 502 errors when refreshing after container restart
- **Solution**:
- Added better session validation in `fetch-thread` API
- Added try-catch for decryption failures (session invalid after restart)
- Client-side now detects 502 errors and clears invalid sessions
- No error toast shown - just resets to empty email state
## Required Environment Variables
Make sure these are set in your `.env` file: