Detail Request Manager: Use tryExecute for delete API call to enable error notifications (#20607)
Use tryExecute for delete API call Replaces direct await of #delete with tryExecute to improve error handling in the delete method of UmbManagementApiDetailDataRequestManager.
This commit is contained in:
@@ -125,7 +125,7 @@ export class UmbManagementApiDetailDataRequestManager<
|
|||||||
}
|
}
|
||||||
|
|
||||||
async delete(id: string): Promise<UmbApiWithErrorResponse> {
|
async delete(id: string): Promise<UmbApiWithErrorResponse> {
|
||||||
const { error } = await this.#delete(id);
|
const { error } = await tryExecute(this, this.#delete(id));
|
||||||
|
|
||||||
// Only update the cache when we are connected to the server events
|
// Only update the cache when we are connected to the server events
|
||||||
if (this.#isConnectedToServerEvents && !error) {
|
if (this.#isConnectedToServerEvents && !error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user