cdisc-org / cdisc-rules-engine

Open source offering of the cdisc rules engine
MIT License
48 stars 13 forks source link

ISS-320: Handle missing variable metadata in test endpoint. #474

Closed nhaydel closed 1 year ago

nhaydel commented 1 year ago

This PR updates error handling in the test endpoint to return a better error message when variable metadata is missing

Steps to test:

  1. Setup your local environment to rune the function app following the steps outlined here: https://learn.microsoft.com/en-us/azure/azure-functions/functions-run-local?tabs=v4%2Cwindows%2Ccsharp%2Cportal%2Cbash Additionally, create a local.settings.json file in the project root with the following json:
    {
    "IsEncrypted": false,
    "Values": {
    "FUNCTIONS_WORKER_RUNTIME": "python",
    "AzureWebJobs.HttpExample.Disabled": "true"
    },
    "Host": {
    "LocalHttpPort": 7071,
    "CORS": "*",
    "CORSCredentials": false
    }
    }
  2. Run the test endpoint locally by running: func start from the root directory
  3. Make a request to the local test function: http://localhost:7071/api/TestRule with the following data: SEND2.json(1).txt
  4. Verify that the response correctly identifies that the user is missing variable metadata