diff options
Diffstat (limited to 'packages/server/src/git/diff.ts')
-rw-r--r-- | packages/server/src/git/diff.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/server/src/git/diff.ts b/packages/server/src/git/diff.ts index 3d69183..d084e5d 100644 --- a/packages/server/src/git/diff.ts +++ b/packages/server/src/git/diff.ts @@ -1,5 +1,5 @@ import { Diff as NodeGitDiff } from "nodegit"; -import { createError, DiffError } from "./error"; +import { createError, ErrorWhere, NotFoundError } from "./error"; import { Patch } from "./patch"; type PatchHeaderData = { @@ -75,7 +75,7 @@ export class Diff { const patch = (await this.ng_diff.patches())[index]; if(!patch) { - throw(createError(DiffError, 500, "Patch not found")); + throw(createError(ErrorWhere.Diff, NotFoundError, "Patch")); } return new Patch(this, (await this.ng_diff.patches())[index], index); |