mirror of
https://github.com/fosrl/olm.git
synced 2026-07-11 03:53:45 -05:00
[PR #124] feat(api): return 426 for unknown socket API routes #2391
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/fosrl/olm/pull/124
Author: @LaurenceJJones
Created: 5/29/2026
Status: 🔄 Open
Base:
dev← Head:feature/api-stale-socket-catchall📝 Commits (1)
3633eeefeat(api): return 426 for unknown socket API routes📊 Changes
3 files changed (+100 additions, -10 deletions)
View changed files
📝
API.md(+18 -0)📝
api/api.go(+35 -10)➕
api/api_test.go(+47 -0)📄 Description
Community Contribution License Agreement
By creating this pull request, I grant the project maintainers an unlimited,
perpetual license to use, modify, and redistribute these contributions under any terms they
choose, including both the AGPLv3 and the Fossorial Commercial license terms. I
represent that I have the right to grant this license for all contributed content.
Description
Add a catch-all handler so clients can detect a stale Olm daemon after CLI upgrade instead of ambiguous Go 404 responses (fosrl/pangolin#3092).
How to test?
When a newer client interacts with the olm socket api it will be returned status
426"upgrade required" which we will inform the clients that they need to restart the tunnel connection. This is a edge case found in https://github.com/fosrl/pangolin/issues/3092 but we shouldnt rely on status404since that is vauge (could be a legit status code that we want EG: ssh into a resource, resource not found?) and olm should return a distinct code for catch all routes.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.