Crypto TypeORM
    Preparing search index...

    Class FieldDecryptionError

    Thrown when a stored column value cannot be decrypted: it was tampered with, moved from another column or entity, written with another key, or is not a ciphertext at all.

    The message names the column context only; it never includes the stored value.

    try {
    await repo.findOneBy({ id: 1 });
    } catch (err) {
    if (err instanceof FieldDecryptionError) {
    console.error(`cannot decrypt ${err.context}`);
    }
    }

    Hierarchy

    • Error
      • FieldDecryptionError
    Index
    context: string

    Column context (Entity.property) the value was read for.