Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Neo-Ciber94 committed Mar 27, 2024
1 parent 02931bc commit a504369
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/server/api/routers/images.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,12 @@ export const imagesRouter = createTRPCRouter({
throw err;
}

const isDev = process.env.NODE_ENV !== "production";
const message =
err instanceof Error
isDev && err instanceof Error
? err.message
: err?.toString() ?? "Something went wrong";

throw new TRPCError({
code: "INTERNAL_SERVER_ERROR",
cause: err,
Expand Down

0 comments on commit a504369

Please sign in to comment.