From 04c82ae98cd912e3f0ae3e426c3c2c30bbab4431 Mon Sep 17 00:00:00 2001 From: SammyBits Date: Mon, 31 Aug 2026 13:05:53 -0400 Subject: [PATCH] fix(versioning): import CommitImportError in push-commits router `POST /api/v1/versioning/repos/:repoId/push-commits` returned 500 with 'ReferenceError: CommitImportError is not defined' because the router's catch-block tested `instanceof CommitImportError` but the class was never named in the import list. Hit on every real push (deltix push to a fresh repo), missed by every test (none pushed a payload that triggered the error path). Same class of bug as promptSecret-not-imported (Deltix-Client v0.7.6). 277 unit tests pass; lint clean. --- CHANGELOG.md | 17 +++++++++++++++++ package.json | 2 +- src/contexts/versioning/versioning.router.ts | 1 + 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d3658d4..ca21dbc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,23 @@ Each entry starts with a **plain-language summary** (what changed, in everyday words) before any technical detail — written so someone outside engineering can understand what shipped and why it matters. +## [0.8.4] - 2026-08-31 + +**In plain terms:** `deltix push` returned 500 on every push because +the server's router referenced an error class that wasn't imported. +Crash with `ReferenceError: CommitImportError is not defined`. +Now it imports the class. + +### Fixed + +- **`deltix push` returned 500 from the server with + `ReferenceError: CommitImportError is not defined`.** The push-commits + router caught `instanceof CommitImportError` but never imported the + class. Every push hit a `ReferenceError`, which the framework + reported as a generic 500. Tests didn't catch it because no test + exercised the actual push path with that error type. + Fix: add `CommitImportError` to the named-import block. + ## [0.8.3] - 2026-08-31 **In plain terms:** global admins now have full access to every repo by diff --git a/package.json b/package.json index 7784d81..04b30df 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "deltix-server", - "version": "0.8.3", + "version": "0.8.4", "private": true, "license": "BUSL-1.1", "type": "module", diff --git a/src/contexts/versioning/versioning.router.ts b/src/contexts/versioning/versioning.router.ts index 7447f79..26bccc3 100644 --- a/src/contexts/versioning/versioning.router.ts +++ b/src/contexts/versioning/versioning.router.ts @@ -7,6 +7,7 @@ import { InvalidRepoRoleError, RepoRoleAssignmentNotFoundError, UserNotFoundErro import type { BranchService } from './branch.service'; import type { CommitExportService } from './commit-export.service'; import type { CommitImportService } from './commit-import.service'; +import { CommitImportError } from './commit-import.service'; import type { DiffService } from './diff.service'; import { BranchAlreadyExistsError,