This commit is contained in:
Niels Lyngsø
2025-01-30 14:15:32 +01:00
parent 2ca4e0e1bd
commit 32a2bab4f0

View File

@@ -32,6 +32,7 @@ export class UmbResourceController extends UmbControllerBase {
* @param promise
*/
static async tryExecute<T>(promise: Promise<T>): Promise<UmbDataSourceResponse<T>> {
// TODO: tryExecute should not take a promise as argument, but should utilize the class property `#promise` instead. (In this way the promise can be cancelled when disconnected)
try {
return { data: await promise };
} catch (error) {