Browse Source

fix(iot-hub): surface dashboard save errors during device-package install/overwrite

Drop ignoreErrors:true on the two saveDashboard calls in the device-install dialog so backend failures (validation errors, missing permissions, entity-limit hits) surface to the global interceptor instead of being swallowed and reported as a generic "install failed" with no detail.
pull/15851/head
Igor Kulikov 3 months ago
parent
commit
a8846fad62
  1. 4
      ui-ngx/src/app/modules/home/components/iot-hub/device-install-dialog/device-install-dialog.component.ts

4
ui-ngx/src/app/modules/home/components/iot-hub/device-install-dialog/device-install-dialog.component.ts

@ -884,7 +884,7 @@ export class TbDeviceInstallDialogComponent extends DialogComponent<TbDeviceInst
return { id: gatewayOutput.id, name: connectorName };
}
case InstallStepType.DASHBOARD: {
const result = await firstValueFrom(this.dashboardService.saveDashboard(template, {ignoreErrors: true}));
const result = await firstValueFrom(this.dashboardService.saveDashboard(template, {ignoreErrors: false}));
return { id: result.id.id, name: result.title, url: `/dashboards/${result.id.id}` };
}
case InstallStepType.RULE_CHAIN: {
@ -999,7 +999,7 @@ export class TbDeviceInstallDialogComponent extends DialogComponent<TbDeviceInst
}
case InstallStepType.DASHBOARD: {
template.id = { id: existing.id, entityType: 'DASHBOARD' };
const result = await firstValueFrom(this.dashboardService.saveDashboard(template, {ignoreErrors: true}));
const result = await firstValueFrom(this.dashboardService.saveDashboard(template, {ignoreErrors: false}));
return { id: result.id.id, name: result.title, url: `/dashboards/${result.id.id}` };
}
case InstallStepType.RULE_CHAIN: {

Loading…
Cancel
Save