cdisc-org / cdisc-rules-engine

Open source offering of the cdisc rules engine
MIT License
46 stars 12 forks source link

For test data, better error message when the "Datasets" tab is not found or malformed #618

Closed chowsanthony closed 6 months ago

chowsanthony commented 6 months ago

Reproduce step: Name the test data spreadsheet tab "datasets" instead of "Datasets."

When the "Datasets" tab is not found or malformed, I see this error message, which I found a tad cryptic and not easy to troubleshoot:

{
  "error": "KeyError",
  "message": "\"one or more datasets missing the following keys {'label'}\""
}

In contrast. when the "Library" tab is not found or malformed, I see this error message, which I found more informative:

{
  "MI": [
    {
      "executionStatus": "execution_error",
      "domain": "MI",
      "variables": [],
      "message": "rule execution error",
      "errors": [
        {
          "error": "An unknown exception has occurred",
          "message": "Missing standard and version data"
        }
      ]
    }
  ]
}

Lastly, I hope the error message to include some coping mechanism, e.g.,, "Make sure there is a 'Datasets' tab, case-sensitive."

chowsanthony commented 6 months ago

Moved this over to the conformance-rules-editor repo.