Skip to content

Report source locations for undefined entity type and action errors in validation #522

@john-h-kastner-aws

Description

@john-h-kastner-aws

Category

Other

Describe the feature you'd like to request

The validator error messages for undefined entity types and actions don't record source locations even though they easily could.

We currently get an error like

  × policy set validation failed
  ╰─▶ validation error on policy `policy0`: unrecognized entity type `AWS`
  help: did you mean `List`?

which is good, but would be better if we pointed to the source location where the entity type is used.

We also don't track source locations for InvalidActionApplication, but fixing this requires more work in #521.

Describe alternatives you've considered

.

Additional context

.

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

Labels

feature-requestThis issue requets a substantial new featurepapercutSmall annoyances in the Cedar SDK. Lower priority fixes than bugs. Smaller than a feature request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions