mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-11-09 22:14:29 +09:00
9 lines
201 B
TypeScript
9 lines
201 B
TypeScript
import { TRPCError } from "@trpc/server";
|
|
|
|
export const throwApiError = (
|
|
code: "BAD_REQUEST" | "NOT_FOUND" | "CONFLICT",
|
|
message: string
|
|
): never => {
|
|
throw new TRPCError({ code, message });
|
|
};
|