Skip to content

Commit

Permalink
HPCC-30421 ECL Watch v9 fix LandingZone silent failure on upload
Browse files Browse the repository at this point in the history
Signed-off-by: Jeremy Clements <[email protected]>
  • Loading branch information
jeclrsg committed Oct 5, 2023
1 parent 6f4d15e commit e882e07
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions esp/src/src-react/components/forms/landing-zone/FileListForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,17 +80,23 @@ export const FileListForm: React.FunctionComponent<FileListFormProps> = ({
.then(response => response.json())
.then(response => {
setSubmitDisabled(false);
const DFUActionResult = response?.UploadFilesResponse?.UploadFileResults?.DFUActionResult;
const exceptions = response?.Exceptions?.Exception ?? [];
if (exceptions.length > 0) {
logger.error(exceptions[0]?.Message ?? nlsHPCC.ErrorUploadingFile);
return;
}
const DFUActionResult = response?.UploadFilesResponse?.UploadFileResults?.DFUActionResult ?? [];
if (DFUActionResult.filter(result => result.Result !== "Success").length > 0) {
console.log("upload failed");
logger.error(nlsHPCC.ErrorUploadingFile);
} else {
closeForm();
if (typeof onSubmit === "function") {
onSubmit();
}
reset(defaultValues);
}
});
})
.catch(err => logger.error(err));
};

handleSubmit(
Expand Down

0 comments on commit e882e07

Please sign in to comment.