Error handling for Genesys upload
When uploading passport data to Genesys the code now stops the upload when there are more then 10 errors reported by Genesys API.
// If more than 10 errors, stop uploading, report error
if (opErrors.size() > 10) {
If there are less than 10 errors then those errors are not reported to the client, giving the impression that upload was successful. The code should still stop the upload at 10 errors, but it should collect error messages reported by Genesys API and make them available to the client as part of UploadState.errors
:
@Data
class UploadState
...
/** Errors reported by Genesys API */
private Map<AccessionInfo, String> errors;
UI update
The upload progress dialog should include display of the number of errors found (in red) and display the error table linking to accessions:
Accession | Error |
---|---|
TMe-419 | Error message here... |