Skip to content

[Bug]: invalid extension policy errors do not name the failing field #696

Closed

Description

@jimhoyd

Runtime revision and environment

main at b85a1ea + PR #695; Node 26.8.2, macOS. Found by reading the code, not reproduced end to end.

Minimal reproduction

A route with policies.extensions.<name> that fails the registration's policySchema (for example, an unknown key) is refused in packages/core/src/extensions.ts (prepareExtensions) with only Invalid extension policy: <name> at <route>. The Ajv errors are thrown away. #693 / #695 fixed the same problem for config using extensionConfigError in config.ts. Policies could use the same approach (pointer, keyword and a reason taken from the schema, never the value).

Relevant output

Invalid extension policy: auth at /admin

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions