Crypto Prisma
    Preparing search index...

    Class FieldDecryptionError

    Thrown when a stored value in an encrypted field cannot be decrypted: it was tampered with, moved from another model or field, written with another key, or is not a ciphertext at all.

    The message names the model and field only; it never includes the stored value.

    try {
    await prisma.user.findUnique({ where: { id: 1 } });
    } catch (err) {
    if (err instanceof FieldDecryptionError) {
    console.error(`cannot decrypt ${err.model}.${err.field}`);
    }
    }

    Hierarchy

    • Error
      • FieldDecryptionError
    Index
    model: string

    Model the value was read from.

    field: string

    Field the value was read from.