aboutsummaryrefslogtreecommitdiff
path: root/packages/server/src/git/error
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2021-08-18 17:29:55 +0200
committerHampusM <hampus@hampusmat.com>2021-08-18 17:29:55 +0200
commitd1a1b7dc947063aef5f8375a6a1e03246b272c84 (patch)
treef5cb9bd6d4b5463d9d022026ac6fea87cb6ebe02 /packages/server/src/git/error
parent6ed078de30a7bf35deace728857d1d293d59eb15 (diff)
Implemented caching for certain API endpoints, Added documentation & made backend-fixes
Diffstat (limited to 'packages/server/src/git/error')
-rw-r--r--packages/server/src/git/error/index.ts3
-rw-r--r--packages/server/src/git/error/types.ts12
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