Jadpo is experimental and not ready for production. These docs follow the compiler's main branch as of 29 Nov 2026. What's built · Install 0.6.0
jadpo
ReferenceErrors

ErrorsPersonal data · rule

data.lookup_not_email

On this page

Code looks a record up by a field that doesn't hold an email address, and only an exact email address finds one person.

Area 15, Personal data; not declinable; the next step is usually the agent's.

Why Jadpo refuses it

A lookup finds one person by the one thing someone is given to find them by: the exact address of their account. Finding by any other field would let an action find records by what they hold, past the entity's read:. So <Entity>.lookup takes only a field built on Email.

What it looks like

main.jadpo:

example
principal {    user: {        subject: Member.handle    }}authentication {    api_token: {}}policy {    actions: {        has_account: [Access.authenticated]    }}type Handle = Text {    max_length: 40}type AddressStanding = Enum {    account_held    no_account}entity Member {    id: Uuid    handle: Handle {        unique: true    }    email: Email {        unique: true    }    policy: {        create: [Access.public]        read: [id]    }}/// Whether an address has an account.action has_account(handle: Member.handle) -> AddressStanding {    match Member.lookup(handle: handle) {        none -> {            return AddressStanding.no_account        }        some -> {            return AddressStanding.account_held        }    }}
jadpo checkcheck failed: 1 error, 1 file

error Member.lookup finds by handle, which isn't built on Email

--> main.jadpo:43:25

   |43 |     match Member.lookup(handle: handle) {   |                         ^^^^^^ `Handle`
reason
A lookup finds one person by their exact email address, the one thing about them a person is given to find them by. Any other field would let an action find records by what they hold. Member.handle is Handle.
next
Find the Member by a field built on Email, or by its id with Member.get (agent)
rule
data.lookup_not_email
help
https://jadpo.dev/docs/errors/data.lookup_not_email

(agent) at the end of the next: line means your coding agent can make the fix itself: it names the email field.

How to fix it

If you are finding someone by their address, look them up by the field that holds it, an Email that is unique: true:

example
action has_account(email: Member.email) -> AddressStanding {    match Member.lookup(email: email) {        none -> {            return AddressStanding.no_account        }        some -> {            return AddressStanding.account_held        }    }}

The lookup now finds the one member with that address, or none.

If you know the record's id, read it with Member.get(member_id), which its entity's read: decides:

example
    var member: Member = attempt Member.get(member_id)

A caller then reads only what the entity's read: lets them.

Markdown for agents: /docs/errors/data.lookup_not_email.md.Built from Jadpo's main branch at commit 9080dc3.