Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Improve error messages for failed YAML validation #3224

Open
varungandhi-src opened this issue Apr 27, 2022 · 0 comments
Open

Improve error messages for failed YAML validation #3224

varungandhi-src opened this issue Apr 27, 2022 · 0 comments

Comments

@varungandhi-src
Copy link
Contributor

I've seen people struggle in the #handbook Slack channel because the error message for validation failures is not great. Here is one example:

Team member reports to non-existent manager role slug: {"name":"Erica Freckelton","pronouns":"she/her","role":"Senior Digital Marketing Manager","reports_to":"director_demand_generation","location":"San Diego, California, United States 🇺🇸","github":"efreckelton","email":"[email protected]","links":"[LinkedIn](https://www.linkedin.com/in/ericafreckelton/)","description":"Erica is a digital marketing strategist hailing from San Diego, CA. She and her trusty dog Zetty relocated from Nashville in 2020 to live with her boyfriend, Matt. You'll often catch her geeking out about digital consumer behavior, online trends, and search data. When not in front of a laptop, you'll probably find her in front of a book. Erica's one-third of the Real Friends Who Read Books, a biweekly book club podcast with her two oldest friends."}

This error has a low signal/noise ratio. Instead, it would be much better to frame it as:

error: Team member reports to non-existent manager:
- Erica Freckleton is marked as reporting to director_demand_generation
- With this change, there is no person with a manager_role_slug: director_demand_generation field.
 
This error commonly occurs when a manager is removed from the org chart.

To fix this error, first identify the current manager for Erica Freckleton.
If the manager doesn't have a manager_role_slug field, create one based on their title.
Then, copy the value from the manager_role_slug field to Erica's reports_to field.

For example, see https://github.com/sourcegraph/handbook/pull/2981/files.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant