Skip to content

Revoking dataset/model access for an unknown email returns 500 #9570

Description

@Ma77Ball

What happened?

Revoking a user's access to a dataset or model by an email that is not a registered user returns a 500 Internal Server Error instead of a clean 400 Bad Request. Granting to an unknown email already returns 400; only revoke crashes.

How to reproduce?

Call the revoke-access endpoint (e.g. on a dataset) with an email that belongs to no registered user; the server responds 500. In code, ResourceAccess.revoke resolves the grantee with ctx.select(USER.UID)...fetchOne().value1(), and fetchOne() returns null for an unknown email, so value1() throws a NullPointerException.

Version/Branch

main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions