[PR #124] feat(api): return 426 for unknown socket API routes #2189

Open
opened 2026-06-18 19:14:14 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/fosrl/olm/pull/124
Author: @LaurenceJJones
Created: 5/29/2026
Status: 🔄 Open

Base: devHead: feature/api-stale-socket-catchall


📝 Commits (1)

  • 3633eee feat(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 status 404 since 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.

## 📋 Pull Request Information **Original PR:** https://github.com/fosrl/olm/pull/124 **Author:** [@LaurenceJJones](https://github.com/LaurenceJJones) **Created:** 5/29/2026 **Status:** 🔄 Open **Base:** `dev` ← **Head:** `feature/api-stale-socket-catchall` --- ### 📝 Commits (1) - [`3633eee`](https://github.com/fosrl/olm/commit/3633eeea728ee133718a64ae27041e36088e1dee) feat(api): return 426 for unknown socket API routes ### 📊 Changes **3 files changed** (+100 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `API.md` (+18 -0) 📝 `api/api.go` (+35 -10) ➕ `api/api_test.go` (+47 -0) </details> ### 📄 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 status `404` since 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-06-18 19:14:14 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/olm#2189