mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-20 07:37:38 +01:00
Merge pull request #9857 from AllForNothing/error-handle
Modify the way to handle 409 error
This commit is contained in:
commit
b4039eb256
@ -228,6 +228,8 @@ export class VulnerabilityConfigComponent implements OnInit, OnDestroy {
|
||||
this.translate.get("CONFIG.SCANNING.TRIGGER_SCAN_ALL_SUCCESS").subscribe((res: string) => {
|
||||
this.errorHandler.info(res);
|
||||
});
|
||||
// reset metrics and then get new metrics
|
||||
this.scanningMetrics = null;
|
||||
this.getManualMetrics();
|
||||
}
|
||||
, error => {
|
||||
|
@ -745,12 +745,9 @@ export class TagComponent implements OnInit, AfterViewInit {
|
||||
}
|
||||
// Trigger scan
|
||||
scanNow(): void {
|
||||
if (this.selectedRow && this.selectedRow.length) {
|
||||
this.selectedRow.forEach((data: any) => {
|
||||
let tagId = data.name;
|
||||
if (this.selectedRow && this.selectedRow.length === 1) {
|
||||
this.onSendingScanCommand = true;
|
||||
this.channel.publishScanEvent(this.repoName + "/" + tagId);
|
||||
});
|
||||
this.channel.publishScanEvent(this.repoName + "/" + this.selectedRow[0].name);
|
||||
}
|
||||
}
|
||||
submitFinish(e: boolean) {
|
||||
|
@ -138,7 +138,11 @@ export class ResultBarChartComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
}, error => {
|
||||
this.onSubmitting = false;
|
||||
this.errorHandler.error(error);
|
||||
if (error && error.error && error.error.code === 409) {
|
||||
console.log(error.error.message);
|
||||
} else {
|
||||
this.errorHandler.error(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user