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

@@ -97,9 +97,15 @@ export class BatchImportPageComponent {
this.router.navigateByUrl(getProcessDetailRoute(rd.payload.processId)); this.router.navigateByUrl(getProcessDetailRoute(rd.payload.processId));
} }
} else { } else {
const title = this.translate.get('process.new.notification.error.title'); if (rd.statusCode === 413) {
const content = this.translate.get('process.new.notification.error.content'); const title = this.translate.get('process.new.notification.error.title');
this.notificationsService.error(title, content); 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.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.header": "Create a new process",
"process.new.title": "Create a new process", "process.new.title": "Create a new process",