@equinor/fusion-query
Advanced tools
Comparing version 5.1.1 to 5.1.2
@@ -29,4 +29,11 @@ import { actions } from './actions'; | ||
})); | ||
// Execute the fetch operation, passing the AbortSignal to allow for cancellation. | ||
return from(fetch(request.args, controller.signal)).pipe(map((value) => actions.execute.success(Object.assign(Object.assign({}, request), { status: 'complete', completed: Date.now(), value }))), catchError((err) => of(actions.execute.failure(err, transaction))), takeUntil(cancel$)); | ||
try { | ||
return from(fetch(request.args, controller.signal)).pipe(map((value) => actions.execute.success(Object.assign(Object.assign({}, request), { status: 'complete', completed: Date.now(), value }))), catchError((err) => of(actions.execute.failure(err, transaction))), takeUntil(cancel$)); | ||
} | ||
catch (err) { | ||
// Normally errors thrown during the execution of the fetch function are caught by the `catchError` operator. | ||
// However, if the fetch function itself throws an error, it will be caught here. | ||
// This can happen if the fetch function is not a function or if it throws synchronously. | ||
return of(actions.execute.failure(err, transaction)); | ||
} | ||
})); | ||
@@ -33,0 +40,0 @@ /** |
// Generated by genversion. | ||
export const version = '5.1.1'; | ||
export const version = '5.1.2'; | ||
//# sourceMappingURL=version.js.map |
@@ -1,1 +0,1 @@ | ||
export declare const version = "5.1.1"; | ||
export declare const version = "5.1.2"; |
{ | ||
"name": "@equinor/fusion-query", | ||
"version": "5.1.1", | ||
"version": "5.1.2", | ||
"description": "WIP", | ||
@@ -74,3 +74,3 @@ "keywords": [ | ||
"uuid": "^10.0.0", | ||
"@equinor/fusion-log": "^1.0.2", | ||
"@equinor/fusion-log": "^1.1.0", | ||
"@equinor/fusion-observable": "^8.4.0" | ||
@@ -83,3 +83,3 @@ }, | ||
"react": "^18.2.0", | ||
"typescript": "^5.5.3", | ||
"typescript": "^5.5.4", | ||
"vitest": "^2.0.5" | ||
@@ -86,0 +86,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
316277
3288
Updated@equinor/fusion-log@^1.1.0