From d1a1b7dc947063aef5f8375a6a1e03246b272c84 Mon Sep 17 00:00:00 2001 From: HampusM Date: Wed, 18 Aug 2021 17:29:55 +0200 Subject: Implemented caching for certain API endpoints, Added documentation & made backend-fixes --- packages/server/src/git/error/index.ts | 3 ++- packages/server/src/git/error/types.ts | 12 ++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'packages/server/src/git/error') 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 -- cgit v1.2.3-18-g5258