cdisc-org / conformance-rules-editor

MIT License
6 stars 3 forks source link

For test data, better error message when the "Library" or "Datasets" tab, or the column headers within them are not found or malformed #211

Open chowsanthony opened 7 months ago

chowsanthony commented 7 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."

gerrycampion commented 6 months ago

Another example: Product and Version within Library tab are also case sensitive and don't provide appropriate error messages.