icgc-argo / platform-ui

Home of Argo Platform UI + @icgc-argo/uikit
http://platform.icgc-argo.org/
GNU Affero General Public License v3.0
7 stars 7 forks source link

🐛 Program Submitter Dashboard crashes from unexpected clinical error data #2726

Closed joneubank closed 11 months ago

joneubank commented 11 months ago

Describe the bug

Currently seeing some program submitter dashboards (first noticed with PACA-CA) crashing. The cause is an edge case in the returned clinical error data for donors.

The specific crash is traced to the line: https://github.com/icgc-argo/platform-ui/blob/develop/components/pages/submission-system/program-dashboard/DonorDataSummary/DonorSummaryTable.tsx#L484

This is happening because there are donor error records that have the errors property that is an empty array, so errors[0] is undefined.

This page should be updated to handle empty arrays gracefully.

The root cause of the issue has to be traced back to the argo clinical api that is generating the error data with this unexpected form.

Steps To Reproduce

Reproducible in production only, due to edge case in PACA-CA submitted clinical data. Program Submitted dashboard for PACA-CA will crash after load during rendering of the DonorSummaryTable.

Expected behaviour

Page should load without crashing with data in this edge case.