Skip to content

Commit 194fee7

Browse files
madsrasmussennielslyngsoe
authored andcommitted
Use tryExecute for delete API call
Replaces direct await of #delete with tryExecute to improve error handling in the delete method of UmbManagementApiDetailDataRequestManager.
1 parent 4a65f56 commit 194fee7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Umbraco.Web.UI.Client/src/packages/management-api/detail/detail-data.request-manager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export class UmbManagementApiDetailDataRequestManager<
125125
}
126126

127127
async delete(id: string): Promise<UmbApiWithErrorResponse> {
128-
const { error } = await this.#delete(id);
128+
const { error } = await tryExecute(this, this.#delete(id));
129129

130130
// Only update the cache when we are connected to the server events
131131
if (this.#isConnectedToServerEvents && !error) {

0 commit comments

Comments
 (0)