@equinor/fusion-framework-module-http
Advanced tools
Comparing version 2.2.0 to 2.2.1
@@ -6,2 +6,6 @@ # Change Log | ||
## 2.2.1 (2022-12-12) | ||
**Note:** Version bump only for package @equinor/fusion-framework-module-http | ||
## [2.2.0](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-module-http@2.1.8...@equinor/fusion-framework-module-http@2.2.0) (2022-12-08) | ||
@@ -8,0 +12,0 @@ |
@@ -79,3 +79,3 @@ var __rest = (this && this.__rest) || function (s, e) { | ||
catch (err) { | ||
throw new HttpResponseError('failed to parse response', response, { | ||
throw new HttpResponseError('failed to execute response selector', response, { | ||
cause: err, | ||
@@ -82,0 +82,0 @@ }); |
export const jsonSelector = (response) => { | ||
if (!response.ok) { | ||
throw new Error('Network response was not OK'); | ||
throw new Error('network response was not OK'); | ||
} | ||
@@ -5,0 +5,0 @@ if (response.status === 204) { |
{ | ||
"name": "@equinor/fusion-framework-module-http", | ||
"version": "2.2.0", | ||
"version": "2.2.1", | ||
"description": "", | ||
@@ -52,3 +52,3 @@ "main": "dist/esm/index.js", | ||
}, | ||
"gitHead": "4241afc72be403a4e998993e6c54119dd9394edd" | ||
"gitHead": "acfc1533fae1e5a95f8463cc2d6e3a2ad94c252e" | ||
} |
@@ -5,2 +5,2 @@ export class HttpResponseError extends Error { | ||
} | ||
} | ||
} |
import { firstValueFrom, of, Subject } from 'rxjs'; | ||
import { catchError, switchMap, takeUntil, tap } from 'rxjs/operators'; | ||
import { switchMap, takeUntil, tap } from 'rxjs/operators'; | ||
import { fromFetch } from 'rxjs/fetch'; | ||
@@ -151,3 +151,3 @@ | ||
throw new HttpResponseError( | ||
'failed to parse response', | ||
'failed to execute response selector', | ||
response as Response, | ||
@@ -154,0 +154,0 @@ { |
@@ -5,3 +5,3 @@ export const jsonSelector = <TType = unknown, TResponse extends Response = Response>( | ||
if (!response.ok) { | ||
throw new Error('Network response was not OK'); | ||
throw new Error('network response was not OK'); | ||
} | ||
@@ -8,0 +8,0 @@ //Status code 204 is no content |
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
182892
1295