PR_26178_ALFA_001-fix-tags-local-api-crash#236
Merged
Conversation
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.
PR_26178_ALFA_001-fix-tags-local-api-crash Report
Scope
listTagsdoes not crash Node whenreadTablesencounters missing API database setup.Changes
TagsApiSetupErrorwrapping insrc/dev-runtime/toolbox-api/alfa-tool-services.mjs.readTablesflow used bylistTags, snapshots, and tag write preflight reads.operatorDiagnosticwhile returning Creator-safe actionable error text through the API error message.tests/dev-runtime/TagsApiService.test.mjsfor the Tags service read path.src/dev-runtime/server/local-api-router.mjsso Tags setup failures return controlled HTTP errors.tests/dev-runtime/TagsApiErrorResponse.test.mjsto prove Tags method failures return HTTP 503 JSON responses and do not escape the router.Non-Goals
Validation Summary
node --check src/dev-runtime/toolbox-api/alfa-tool-services.mjsnode --check src/dev-runtime/server/local-api-router.mjsnode --check tests/dev-runtime/TagsApiService.test.mjsnode --check tests/dev-runtime/TagsApiErrorResponse.test.mjsnode ./scripts/run-node-test-files.mjs tests/dev-runtime/TagsApiService.test.mjsnode ./scripts/run-node-test-files.mjs tests/dev-runtime/TagsApiErrorResponse.test.mjs tests/dev-runtime/TagsApiService.test.mjsnode ./scripts/run-node-test-files.mjs tests/dev-runtime/DevRuntimeBoundary.test.mjswas attempted and exposed an existing unrelated router assertion around the legacylocal-dbroute. This branch does not modifysrc/dev-runtime/server/local-api-router.mjs.Result
PR-scoped validation is PASS. The Tags service now fails safely with actionable setup guidance when the API database adapter or Tags schema is missing, and the Local API route returns controlled HTTP errors without terminating the Node server.