diff --git a/backend/src/main/java/io/metersphere/performance/service/ReportService.java b/backend/src/main/java/io/metersphere/performance/service/ReportService.java index c92f68298e..3bc2fabaf6 100644 --- a/backend/src/main/java/io/metersphere/performance/service/ReportService.java +++ b/backend/src/main/java/io/metersphere/performance/service/ReportService.java @@ -279,7 +279,7 @@ public class ReportService { public byte[] downloadJtl(String reportId) { LoadTestReportWithBLOBs report = getReport(reportId); if (StringUtils.isBlank(report.getFileId())) { - MSException.throwException(Translator.get("load_test_report_file_not_exist")); + throw new RuntimeException(Translator.get("load_test_report_file_not_exist")); } return fileService.loadFileAsBytes(report.getFileId()); } diff --git a/frontend/src/business/components/performance/report/PerformanceReportView.vue b/frontend/src/business/components/performance/report/PerformanceReportView.vue index 2cd890a9c8..b4a87e4dfd 100644 --- a/frontend/src/business/components/performance/report/PerformanceReportView.vue +++ b/frontend/src/business/components/performance/report/PerformanceReportView.vue @@ -26,7 +26,7 @@ {{ $t('test_track.plan_view.export_report') }} - 下载JTL + {{ $t('report.downloadJtl') }} @@ -307,7 +307,10 @@ export default { navigator.msSaveBlob(blob, this.filename) } }).catch(e => { - Message.error({message: e.message, showClose: true}); + let text = e.response.data.text(); + text.then((data) => { + Message.error({message: JSON.parse(data).message || e.message, showClose: true}); + }); }); } },