vovk 3.0.0-draft.244 → 3.0.0-draft.246

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15,7 +15,7 @@ const defaultHandler = async (response) => {
15
15
  if (!response.ok) {
16
16
  // handle server errors
17
17
  const errorResponse = result;
18
- throw new HttpException_1.HttpException(response.status, errorResponse?.message ?? exports.DEFAULT_ERROR_MESSAGE, errorResponse?.cause);
18
+ throw new HttpException_1.HttpException(response.status, errorResponse?.message ?? exports.DEFAULT_ERROR_MESSAGE, errorResponse?.cause ?? errorResponse);
19
19
  }
20
20
  return result;
21
21
  };
@@ -42,7 +42,7 @@ function createFetcher({ prepareRequestInit, transformResponse, } = {}) {
42
42
  ...init,
43
43
  headers: {
44
44
  accept: 'application/jsonl, application/json',
45
- ...(body instanceof FormData ? {} : { 'Content-Type': 'application/json' }),
45
+ ...(body instanceof FormData ? {} : { 'content-type': 'application/json' }),
46
46
  ...init?.headers,
47
47
  },
48
48
  };
@@ -15,7 +15,7 @@ const defaultHandler = async (response) => {
15
15
  if (!response.ok) {
16
16
  // handle server errors
17
17
  const errorResponse = result;
18
- throw new HttpException_1.HttpException(response.status, errorResponse?.message ?? exports.DEFAULT_ERROR_MESSAGE, errorResponse?.cause);
18
+ throw new HttpException_1.HttpException(response.status, errorResponse?.message ?? exports.DEFAULT_ERROR_MESSAGE, errorResponse?.cause ?? errorResponse);
19
19
  }
20
20
  return result;
21
21
  };
@@ -42,7 +42,7 @@ function createFetcher({ prepareRequestInit, transformResponse, } = {}) {
42
42
  ...init,
43
43
  headers: {
44
44
  accept: 'application/jsonl, application/json',
45
- ...(body instanceof FormData ? {} : { 'Content-Type': 'application/json' }),
45
+ ...(body instanceof FormData ? {} : { 'content-type': 'application/json' }),
46
46
  ...init?.headers,
47
47
  },
48
48
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vovk",
3
- "version": "3.0.0-draft.244",
3
+ "version": "3.0.0-draft.246",
4
4
  "main": "./cjs/index.js",
5
5
  "module": "./mjs/index.js",
6
6
  "types": "./mjs/index.d.ts",