Skip to content

More helpful error message when schema validation fails #160

@jbusecke

Description

@jbusecke

Over in leap-stc/data-management#75 i encountered a rather cryptic error:

***"message": "Error during running: ", "exc_info": "Traceback (most recent call last):\n  File \"/usr/local/bin/pangeo-forge-runner\", line 8, in <module>\n    sys.exit(main())\n  File \"/usr/local/lib/python3.10/dist-packages/pangeo_forge_runner/cli.py\", line 28, in main\n    app.start()\n  File \"/usr/local/lib/python3.10/dist-packages/pangeo_forge_runner/cli.py\", line 23, in start\n    super().start()\n  File \"/usr/local/lib/python3.10/dist-packages/traitlets/config/application.py\", line 475, in start\n    return self.subapp.start()\n  File \"/usr/local/lib/python3.10/dist-packages/pangeo_forge_runner/commands/bake.py\", line 229, in start\n    recipes = feedstock.parse_recipes()\n  File \"/usr/local/lib/python3.10/dist-packages/pangeo_forge_runner/feedstock.py\", line 80, in parse_recipes\n    assert any(\nAssertionError", "status": "failed"***

It seemed related to the new schema validation but I had to ask @cisaacstern to get to the bottom of the problem.

Could we raise a more informative error message like:

Your recipe_id:`my_recipe` contains fields ['not_this', 'worse'] which are not allowed, only allowed values are ['def_this', 'yay']

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions