icgc-argo / roadmap

Place to review/request new features and new tools on ICGC-ARGO's roadmap
1 stars 0 forks source link

🐛 Apply donor-level exceptions on given entities give `400` errors #1184

Open lindaxiang opened 6 days ago

lindaxiang commented 6 days ago

Describe the bug

We’ve implemented program-level and donor-level exceptions:

We should support the programs to request both program and donor level exceptions as long as they are applied on different fields. However, when I tried to apply donor-level exceptions, it gives me 400 error with message: Program exception already exists.

Steps To Reproduce

Steps to reproduce the behaviour:

  1. Go to 'https://clinical.argo-qa.cumulus.genomeinformatics.org/api-docs/#/Exception/post_exception_property__programId__entity'
  2. Provide your access JWT token
  3. Click on 'Try it out'
  4. Input MONSTAR-JP as programId
  5. Click on Choose File by submitting the file Monstar-jp-donorExceptionFile_specimen_Oct08.txt
  6. See the error: 400 with message: Program exception already exists.

Note: You can check the Program-level exceptions for MONSTAR-JP, and it does not have exceptions on the requested fields.

Expected behaviour

It should allow me to apply both both program and entity level exceptions at the same time as long as they are applied on different fields.

lindaxiang commented 5 days ago

Program level exception file for testing in QA: Monstar-jp-programExceptionFile_Sep11-qa.txt

lindaxiang commented 3 days ago

Test environment: QA Test program: MONSTAR-JP

I am able to apply the donor-level exceptions for entity of Specimen with the following test file: Monstar-jp-donorExceptionFile_specimen_Oct08.txt The clinical data submissions also work as expected. It will allow me to submit the records with requested exception values.

However, when I continued to apply the donor-level exceptions for another entity of Treatment with the following file: Monstar-jp-donorExceptionFile_treatment_Oct08.txt It gave me the following 500 error:

{
  "error": "ValidationError",
  "message": ""
}

I can't see the details of the error, so not sure what's going wrong.