Skip to content

Commit

Permalink
Fix error handling; Bump v1.0.0
Browse files Browse the repository at this point in the history
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
  • Loading branch information
torchiaf committed May 24, 2024
1 parent ee59fbf commit 457aeaf
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ export class AdminViewsComponent implements OnInit, OnDestroy {
repo: res.repo?.git.repo,
branch: res.repo?.git.branch,
}
}
};

await this.restClient.api.adminCreateView(row.Name || '', requestBody);
} catch (error) {
this.creating = null;
Expand All @@ -168,10 +168,13 @@ export class AdminViewsComponent implements OnInit, OnDestroy {
if (res) {
this.deleting = view.Id;

await this.restClient.api.deleteView(view.Id);
try {
await this.restClient.api.deleteView(view.Id);
} catch (error) {
this.deleting = null;
}

this.deleting = null;

this.tableRefresh$.next();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,11 @@ export class UserViewsComponent implements OnInit, OnDestroy {
if (res && this.data) {
this.deleting = true;

await this.restClient.api.deleteView(this.data.Id);
try {
await this.restClient.api.deleteView(this.data.Id);
} catch (error) {
this.deleting = false;
}

this.deleting = false;

Expand All @@ -107,7 +111,7 @@ export class UserViewsComponent implements OnInit, OnDestroy {
repo: res.repo?.git.repo,
branch: res.repo?.git.branch,
}
}
};

await this.restClient.api.userCreateView(requestBody);
} catch (error) {
Expand Down

0 comments on commit 457aeaf

Please sign in to comment.