Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

[#45963] replaced JSON string error toast

Eric Schubert91ee0f4c0c9d
diff --git a/frontend/src/app/shared/components/storages/file-picker-modal/file-picker-modal.component.ts b/frontend/src/app/shared/components/storages/file-picker-modal/file-picker-modal.component.ts
index e61b7e7b3af..a6e25fdb3a5 100644
--- a/frontend/src/app/shared/components/storages/file-picker-modal/file-picker-modal.component.ts
+++ b/frontend/src/app/shared/components/storages/file-picker-modal/file-picker-modal.component.ts
@@ -49,6 +49,7 @@ import {
import {
FilePickerBaseModalComponent,
} from 'core-app/shared/components/storages/file-picker-base-modal.component.ts/file-picker-base-modal.component';
+import { HttpErrorResponse } from '@angular/common/http';
@Component({
templateUrl: 'file-picker-modal.component.html',
@@ -113,7 +114,7 @@ export class FilePickerModalComponent extends FilePickerBaseModalComponent {
files,
).subscribe(
(fileLinks) => { this.toastService.addSuccess(this.text.toast.successFileLinksCreated(fileLinks.count)); },
- (error) => { this.toastService.addError(JSON.stringify(error)); },
+ (error:HttpErrorResponse) => { this.toastService.addError(error); },
);
this.service.close();