Initial commit
This commit is contained in:
12
packages/marketing-pages/src/integrations/api/procedures.ts
Normal file
12
packages/marketing-pages/src/integrations/api/procedures.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { t } from "@repo/core-shared/trpc/init";
|
||||
import { defineErrorMiddleware } from "@repo/core-shared/trpc/define-error-middleware";
|
||||
|
||||
import { PageNotFoundError } from "../../entities/errors/page";
|
||||
import { InputParseError } from "../../entities/errors/common";
|
||||
|
||||
export const marketingPagesProcedure = t.procedure.use(
|
||||
defineErrorMiddleware([
|
||||
[InputParseError, "BAD_REQUEST"],
|
||||
[PageNotFoundError, "NOT_FOUND"],
|
||||
]),
|
||||
);
|
||||
Reference in New Issue
Block a user