diff options
Diffstat (limited to 'packages/server/src/git/error')
-rw-r--r-- | packages/server/src/git/error/index.ts | 3 | ||||
-rw-r--r-- | packages/server/src/git/error/types.ts | 12 |
2 files changed, 14 insertions, 1 deletions
diff --git a/packages/server/src/git/error/index.ts b/packages/server/src/git/error/index.ts index b8994d3..55a3aef 100644 --- a/packages/server/src/git/error/index.ts +++ b/packages/server/src/git/error/index.ts @@ -21,7 +21,8 @@ export enum ErrorWhere { Commit = "commit", Diff = "diff", Misc = "misc", - Blob = "blob" + Blob = "blob", + Patch = "patch" } /** diff --git a/packages/server/src/git/error/types.ts b/packages/server/src/git/error/types.ts index b8c860b..19ad710 100644 --- a/packages/server/src/git/error/types.ts +++ b/packages/server/src/git/error/types.ts @@ -42,4 +42,16 @@ export class NotInKeyringError extends ErrorType { constructor(email: string) { super(500, `A public key for '${email}' doesn't exist in the server pgp keyring!`); } +} + +export class PatchTooLargeError extends ErrorType { + constructor() { + super(500, "Patch is too large for parsing!"); + } +} + +export class DiffTooLargeError extends ErrorType { + constructor() { + super(500, "Diff is too large for parsing!"); + } }
\ No newline at end of file |