File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
src/Umbraco.Web.UI.Client/src/packages/core/resources Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import {
12
12
CancelError ,
13
13
type ProblemDetails ,
14
14
} from '@umbraco-cms/backoffice/external/backend-api' ;
15
+ import { UmbDeprecation } from '../utils/deprecation/deprecation.js' ;
15
16
16
17
export class UmbResourceController extends UmbControllerBase {
17
18
#promise: Promise < any > ;
@@ -48,11 +49,20 @@ export class UmbResourceController extends UmbControllerBase {
48
49
/**
49
50
* Wrap the {tryExecute} function in a try/catch block and return the result.
50
51
* If the executor function throws an error, then show the details in a notification.
51
- * @param options
52
+ * @param _options
52
53
*/
54
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
53
55
async tryExecuteAndNotify < T > ( options ?: UmbNotificationOptions ) : Promise < UmbDataSourceResponse < T > > {
54
56
const { data, error } = await UmbResourceController . tryExecute < T > ( this . #promise) ;
55
57
58
+ if ( options ) {
59
+ new UmbDeprecation ( {
60
+ deprecated : 'tryExecuteAndNotify `options` argument is deprecated.' ,
61
+ removeInVersion : '17.0.0' ,
62
+ solution : 'Use the method without arguments.' ,
63
+ } ) . warn ( ) ;
64
+ }
65
+
56
66
if ( error ) {
57
67
/**
58
68
* Determine if we want to show a notification or just log the error to the console.
You can’t perform that action at this time.
0 commit comments