Skip to content

Commit

Permalink
Add console.error
Browse files Browse the repository at this point in the history
  • Loading branch information
harshsbhat committed Dec 28, 2024
1 parent 3b36e6c commit 3a66720
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions apps/dashboard/lib/trpc/routers/key/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ export const createKey = t.procedure
};
const requestId = crypto.randomUUID();
const context: RequestContext = { requestId };
const vaultRes = await vault.encrypt(context, encryptReq).catch((_err) => {
const vaultRes = await vault.encrypt(context, encryptReq).catch((err) => {
console.error(err);
throw new TRPCError({
code: "INTERNAL_SERVER_ERROR",
message: "Encryption Failed. Please contact support using support@unkey.dev",
Expand All @@ -135,7 +136,8 @@ export const createKey = t.procedure
encrypted: vaultRes.encrypted,
encryptionKeyId: vaultRes.keyId,
})
.catch((_err) => {
.catch((err) => {
console.error(err);
throw new TRPCError({
code: "INTERNAL_SERVER_ERROR",
message:
Expand Down

0 comments on commit 3a66720

Please sign in to comment.