aboutsummaryrefslogtreecommitdiff
path: root/u/server/filter/index.ts
diff options
context:
space:
mode:
authorElizabeth Hunt <me@liz.coffee>2025-07-27 18:50:33 -0700
committerElizabeth Hunt <me@liz.coffee>2025-07-27 19:31:06 -0700
commit7aa11b7a8abacf81dec20fff21216df35d333756 (patch)
tree40f6a76c37412cf1c5a67f99a4ee30e3aae863c9 /u/server/filter/index.ts
parente4df72cd446270cf867ec308995a05e21b3aa601 (diff)
downloadci-7aa11b7a8abacf81dec20fff21216df35d333756.tar.gz
ci-7aa11b7a8abacf81dec20fff21216df35d333756.zip
Pulls in pengueno from npm
Diffstat (limited to 'u/server/filter/index.ts')
-rw-r--r--u/server/filter/index.ts34
1 files changed, 0 insertions, 34 deletions
diff --git a/u/server/filter/index.ts b/u/server/filter/index.ts
deleted file mode 100644
index 75168c7..0000000
--- a/u/server/filter/index.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-import {
- type IEither,
- type ITraceable,
- LogLevel,
- type PenguenoRequest,
- type ServerTrace,
-} from '@emprespresso/pengueno';
-
-export enum ErrorSource {
- USER = LogLevel.WARN,
- SYSTEM = LogLevel.ERROR,
-}
-
-export class PenguenoError extends Error {
- public readonly source: ErrorSource;
- constructor(
- override readonly message: string,
- public readonly status: number,
- ) {
- super(message);
- this.source = Math.floor(status / 100) === 4 ? ErrorSource.USER : ErrorSource.SYSTEM;
- }
-}
-
-export interface RequestFilter<
- T,
- Err extends PenguenoError = PenguenoError,
- RIn = ITraceable<PenguenoRequest, ServerTrace>,
-> {
- (req: RIn): IEither<Err, T> | Promise<IEither<Err, T>>;
-}
-
-export * from './method.js';
-export * from './json.js';