1 parent
4235b32349
commit
7d1c69801e
14 files changed
+30
-30
No files matched your search
@@ -1,15 +1,15 @@
|
||||
import { z } from "zod";
|
||||
|
||||
import * as trpcNext from "@calcom/trpc/server/adapters/next";
|
||||
import { createContext as createTrpcContext } from "@calcom/trpc/server/createContext";
|
||||
|
||||
import type { AnyRouter } from "@trpc/server";
|
||||
import { createNextApiHandler as _createNextApiHandler } from "@trpc/server/adapters/next";
|
||||
|
||||
import { createContext as createTrpcContext } from "./createContext";
|
||||
|
||||
/**
|
||||
* Creates an API handler executed by Next.js.
|
||||
*/
|
||||
export function createNextApiHandler(router: AnyRouter, isPublic = false, namespace = "") {
|
||||
return trpcNext.createNextApiHandler({
|
||||
return _createNextApiHandler({
|
||||
router,
|
||||
/**
|
||||
* @link https://trpc.io/docs/context
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as Sentry from "@sentry/nextjs";
|
||||
import { captureException as SentryCaptureException } from "@sentry/nextjs";
|
||||
|
||||
import { redactError } from "@calcom/lib/redactError";
|
||||
|
||||
@@ -11,7 +11,7 @@ const captureErrorsMiddleware = middleware(async ({ next }) => {
|
||||
if (!cause) {
|
||||
return result;
|
||||
}
|
||||
Sentry.captureException(cause);
|
||||
SentryCaptureException(cause);
|
||||
throw redactError(cause);
|
||||
}
|
||||
return result;
|
||||
|
||||
Reference in new issue
Block a user