Merge pull request #2162 from TexasDigitalLibrary/DS-8668

DS-8668: adds check for HTTP 413 status code when importing an SAF file
This commit is contained in:
Tim Donohue
2023-04-14 11:43:20 -05:00
committed by GitHub
2 changed files with 11 additions and 3 deletions

View File

@@ -96,11 +96,17 @@ export class BatchImportPageComponent {
if (isNotEmpty(rd.payload)) {
this.router.navigateByUrl(getProcessDetailRoute(rd.payload.processId));
}
} else {
if (rd.statusCode === 413) {
const title = this.translate.get('process.new.notification.error.title');
const content = this.translate.get('process.new.notification.error.max-upload.content');
this.notificationsService.error(title, content);
} else {
const title = this.translate.get('process.new.notification.error.title');
const content = this.translate.get('process.new.notification.error.content');
this.notificationsService.error(title, content);
}
}
});
}
}

View File

@@ -3257,6 +3257,8 @@
"process.new.notification.error.content": "An error occurred while creating this process",
"process.new.notification.error.max-upload.content": "The file exceeds the maximum upload size",
"process.new.header": "Create a new process",
"process.new.title": "Create a new process",