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

obey eslint

as-op0509a2c2085e
diff --git a/frontend/src/stimulus/controllers/dynamic/work-packages/export/form.controller.ts b/frontend/src/stimulus/controllers/dynamic/work-packages/export/form.controller.ts
index bdf0e1fa251..149bd00801b 100644
--- a/frontend/src/stimulus/controllers/dynamic/work-packages/export/form.controller.ts
+++ b/frontend/src/stimulus/controllers/dynamic/work-packages/export/form.controller.ts
@@ -1,5 +1,6 @@
import { Controller } from '@hotwired/stimulus';
import * as Turbo from '@hotwired/turbo';
+import { HttpErrorResponse } from '@angular/common/http';
export default class FormController extends Controller<HTMLFormElement> {
static values = {
@@ -47,12 +48,12 @@ export default class FormController extends Controller<HTMLFormElement> {
const exportURL = `${formatURL}?${searchParams.toString()}`;
this.requestExport(exportURL)
.then((job_id) => this.showJobModal(job_id))
- .catch((error) => this.handleError(error as string));
+ .catch((error:HttpErrorResponse) => this.handleError(error));
}
- private handleError(error:any) {
+ private handleError(error:HttpErrorResponse) {
void window.OpenProject.getPluginContext().then((pluginContext) => {
- pluginContext.services.notifications.addError(error as string);
+ pluginContext.services.notifications.addError(error);
});
}