Skip to content

Misleading compiler error when 'roles' is set to a string instead of an array #26788

@jeffhandley

Description

@jeffhandley

I mistakenly tried using write for the on.roles property instead of specifying it as an array of [write], and this resulted in a misleading compiler error:

error: 'roles': value must be 'all'. Expected format: {"create":null,"gollum":null,"page_build":null}

This pointed me down the wrong path, suggesting that I open roles up to all users instead of correcting the value to use [write] or to simply omit on.roles to get the default of [admin,maintainer,write] (which I realized is actually what I needed).

Ideally, the compiler error would indicate that roles needs to be either 'all' or an array of roles, showing the valid role values, with an additional statement of what the default value is if the property is omitted.

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions