This commit is contained in:
Frank
2025-09-12 14:22:40 -04:00
parent 417e8f619c
commit c6c153de95
3 changed files with 46 additions and 7 deletions

View File

@@ -41,7 +41,11 @@ export namespace Key {
key: secretKey,
timeUsed: null,
}),
)
).catch((e: any) => {
if (e.message.match(/Duplicate entry '.*' for key 'key.name'/))
throw new Error("A key with this name already exists. Please choose a different name.")
throw e
})
return keyID
})