handle http status code 413 from the backend when an SAF file is larger than the limit

This commit is contained in:
nwoodward
2023-03-24 08:48:19 -05:00
parent 694fa39a6e
commit b2a9c4f456
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

@@ -3255,6 +3255,8 @@
"process.new.notification.error.content": "An error occurred while creating this process",
"process.new.notification.error.max-upload.content": "One or more files exceeds the maximum upload size",
"process.new.header": "Create a new process",
"process.new.title": "Create a new process",