Skip to content

Improved error message when trying to use in for set membership #177

@cdisselkoen

Description

@cdisselkoen

Category

Other

Describe the feature you'd like to request

As pointed out by @khieta in this comment on RFC 18. For errors like

context.solution_id in principal.solution_ids

instead of the not-very-helpful error message

Errors: while evaluating policy policy0, encountered the following error: type error: expected (entity of type any_entity_type), got string

we should have something more helpful like this

type error: in expects an entity on the LHS. Use .contains() for set membership

Describe the solution you'd like

As above.

Describe alternatives you've considered

RFC 18 discusses alternatives, but this is something we can do now to help while RFC 18 continues to be discussed and/or implemented.

Additional context

No response

Is this something that you'd be interested in working on?

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

Metadata

Metadata

Assignees

Labels

feature-requestThis issue requets a substantial new feature

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions