Repository navigation
feat(api): answer the front door instead of 404ing it - #4
Merged
Merged
Conversation
Pasting the API's hostname into a browser returned
{"error":{"code":"not_found","message":"route not found"}}, because the app
registers /health/* and /api/v1/* and nothing at /. That is correct behaviour
and it reads as a broken deployment — it is what sent somebody looking for an
outage that was not there.
GET / now returns what is running and where to go instead: the service name, the
version and commit it was built from, and the health and API paths. An unknown
path is still a 404, which is the half of this that has to keep working.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pasting
outreachgraph.up.railway.appinto a browser returns:{"error":{"code":"not_found","message":"route not found"}}That is the app's own 404 handler working correctly — it registers
/health/*and/api/v1/*and nothing at/. It is also indistinguishable from a broken deployment at a glance, and it is what sent us looking for an outage that was not there. The API was healthy the whole time (/health/ready→{"status":"ok","database":"reachable"}).GET /now returns what is running and where to go instead — service, version, commit, and the health and API paths. An unknown path is still a 404, which is the half of this that has to keep working, so both are tested.33 tests pass in
apps/api.🤖 Generated with Claude Code