Added http-status-ts enum error codes - #42
Merged
Conversation
The hand-merge that brought this branch up to date pulled in two changes unrelated to the status-code work: - `maxWorkers: 1` on the backend vitest project. The suite passes without it (190/190) and runs in 34s instead of 58s. Storage isolation is per-test-file and `applyD1Migrations` is idempotent, so parallel workers are already safe by design. - The `/toggle-open-composite` route, which #40 deleted when the flag became something load computes. Nothing calls it, and writing the flag by hand would just be overwritten on the next load. Also convert the call sites the sweep missed: `getLibraryParam`, the onError rate-limit and fallback responses, `OnshapeRateLimitError`, and the 429 check in `OnshapeApi`. Test assertions keep their literals so they still pin the wire values independently. Moves the http-status-ts import in onshape-api.ts up with the other imports.
cert advanced past this branch's base with the cache-policy work, which restructured the four files the status-code sweep had touched. Resolved by taking cert's version of each and re-applying only the enum conversion, so the caching behavior comes through unchanged: - create-app.ts: cert's rewrite (getEntryUrl, isAuthenticated service, cacheMiddleware on /auth and /init); re-converted the onError 429/500. - configurations.ts, library.ts, thumbnails.ts: cert's cacheMiddleware wrapping kept as-is; re-converted the 400/404s in the new route bodies. Also converts the one new bare literal cert introduced, the "Missing cache version" 400 in cacheMiddleware, which auto-merged into app.ts. Kept this branch's package-lock.json: the merged package.json adds only http-status-ts and the zod-validator bump, cert added no dependencies, and cert's lockfile does not satisfy the 0.9.0 range. Its resolutions are ahead of cert's on 43 transitive packages and no package is missing.
AlexKempen
approved these changes
Aug 16, 2026
AlexKempen
left a comment
Collaborator
There was a problem hiding this comment.
Looks good, Claude found two or three extra places and I removed the max parallel limiter since I don't think that's an actual issue, but no big issue. Thanks for the PR!
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.
Added the npm package, http-status-ts, to use its error code enum for backend handling on various routes.