fix(tables): make the feature-gate 404 message explicit - #7994
Merged
Conversation
Callers previously received the same generic 'Not Found - not available on team' message whether a database genuinely didn't exist or the team's plan simply doesn't include FlowFuse Tables, with no way to tell the two apart. The message now names the feature and states it isn't enabled, while the status code and code field are unchanged.
cstns
approved these changes
Jul 28, 2026
andypalmi
enabled auto-merge (squash)
July 28, 2026 12:58
andypalmi
disabled auto-merge
July 28, 2026 13:02
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7994 +/- ##
=======================================
Coverage 75.86% 75.86%
=======================================
Files 434 434
Lines 23340 23340
Branches 6209 6209
=======================================
Hits 17708 17708
Misses 5632 5632
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Summary
When FlowFuse Tables isn't enabled for a team's plan, every route under
/api/v1/teams/:teamId/databasesreturns a plain 404:{ code: 'not_found', error: 'Not Found - not available on team' }. This is indistinguishable from a genuine "that database/table doesn't exist" response.This came up while adding FlowFuse Tables as an MCP tool for Expert (see #7990): an LLM agent calling these tools has no signal that the feature simply isn't enabled versus the resource not existing, so it can't usefully tell the user "enable Tables for your team" instead of "that doesn't exist".
We discussed two options: augmenting the response with a new
reason/reasonCodefield (backward compatible, but introduces a new convention with no precedent in the codebase), versus just making the existing message explicit. Went with the latter since it's a plain string with no established contract around its exact wording, matches the clearest existing precedent (forge/routes/api/assistant.js:185), and needs no new convention.Status code and
codefield are unchanged, only theerrormessage now names the feature.Test plan