Skip to content

Fuzzy match on non-existing extension functions #332

@aaronjeline

Description

@aaronjeline

Category

Documentation and code comments

Describe the feature you'd like to request

When the cedar evaluator errors because you called a non-existent extension function, it would be nice if the error message included a suggestion of what you might have meant. The Cedar validator does this now for bad attribute names.

Ex:
If my policy is contains: context.src.isInRange(Ip("1.1.1.1/24")), the error message right now says:

poorly formed: `Ip` is not a function

It would be nice if it said something like this:

poorly formed: `Ip` is not a function. Did you mean `ip`?

Describe alternatives you've considered

No alternatives

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

No one assigned

    Labels

    feature-requestThis issue requets a substantial new featuregood-first-issueGood for newcomers. A smaller issue that someone new to the Cedar codebase should be able to tacklehelp-wantedCommunity help desired. We have not scheduled time to fix this, but think it important.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions