-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MHV-65059 Error handling for BB download (#33535)
* MHV-65059 Don't overwrite data if key is missing from the action payload * MHV-65059 Modified action to only call necessary APIs * MHV-65059 Harmonized flow for generating BB PDF * MHV-65059 Revert test data * MHV-65059 Started adding error-handling * MHV-65059 More work on error handling * MHV-65059 Fixed mismatched field * MHV-65059 Added error alert for failed APIs * MHV-65059 Fixed unit tests * MHV-65059 Added a test for failed calls * MHV-65059 Fixed URL for appointments
- Loading branch information
Showing
9 changed files
with
256 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
src/applications/mhv-medical-records/components/DownloadRecords/MissingRecordsError.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
|
||
const MissingRecordsError = ({ recordTypes }) => { | ||
if (!Array.isArray(recordTypes) || recordTypes.length === 0) { | ||
return <></>; | ||
} | ||
return ( | ||
<va-alert | ||
status="error" | ||
visible | ||
aria-live="polite" | ||
data-testid="missing-records-error-alert" | ||
> | ||
<h3 id="track-your-status-on-mobile" slot="headline"> | ||
We can’t include certain records in your VA Blue Button report right now | ||
</h3> | ||
<p> | ||
We’re sorry. There’s a problem with our system. The report you just | ||
downloaded doesn’t include these records: | ||
</p> | ||
<ul> | ||
{recordTypes.map(recordType => ( | ||
<li key={recordType}>{recordType}</li> | ||
))} | ||
</ul> | ||
<p> | ||
Try downloading these records again later. If it still doesn’t work, | ||
call us at <va-telephone contact="8773270022" /> ( | ||
<va-telephone tty contact="711" /> | ||
). We’re here Monday through Friday, 8:00 a.m. to 8:00 p.m. ET. | ||
</p> | ||
</va-alert> | ||
); | ||
}; | ||
|
||
export default MissingRecordsError; | ||
|
||
MissingRecordsError.propTypes = { | ||
recordTypes: PropTypes.array, | ||
}; |
Oops, something went wrong.