export class CredentialKeyRotatedError extends Error { readonly storedKeyId: string; constructor(storedKeyId: string) { super( `Credential was encrypted with key "${storedKeyId}" but the current master key produces a different id. ` + `Re-bind the credential to re-encrypt it with the active key.`, ); this.name = "CredentialKeyRotatedError"; this.storedKeyId = storedKeyId; } }