@microlink/mql 0.13.1 → 0.13.3
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.
- package/lightweight/index.d.ts +8 -2
- package/lightweight/index.js +833 -1
- package/lightweight/index.umd.js +850 -1
- package/package.json +1 -1
- package/src/factory.js +3 -3
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@microlink/mql",
|
|
3
3
|
"description": "Microlink Query Language. The official HTTP client to interact with Microlink API for Node.js, browsers & Deno.",
|
|
4
4
|
"homepage": "https://microlink.io/mql",
|
|
5
|
-
"version": "0.13.
|
|
5
|
+
"version": "0.13.3",
|
|
6
6
|
"types": "lightweight/index.d.ts",
|
|
7
7
|
"exports": {
|
|
8
8
|
"require": "./src/node.js",
|
package/src/factory.js
CHANGED
|
@@ -64,8 +64,8 @@ const factory = streamResponseType => ({
|
|
|
64
64
|
return opts.responseType === streamResponseType
|
|
65
65
|
? response
|
|
66
66
|
: { ...response.body, response }
|
|
67
|
-
} catch (
|
|
68
|
-
const { response = {} } =
|
|
67
|
+
} catch (error) {
|
|
68
|
+
const { response = {} } = error
|
|
69
69
|
const {
|
|
70
70
|
statusCode,
|
|
71
71
|
body: rawBody,
|
|
@@ -77,7 +77,7 @@ const factory = streamResponseType => ({
|
|
|
77
77
|
const body =
|
|
78
78
|
isObject(rawBody) && !isBodyBuffer
|
|
79
79
|
? rawBody
|
|
80
|
-
: parseBody(isBodyBuffer ? rawBody.toString() : rawBody,
|
|
80
|
+
: parseBody(isBodyBuffer ? rawBody.toString() : rawBody, error, uri)
|
|
81
81
|
|
|
82
82
|
throw new MicrolinkError({
|
|
83
83
|
...body,
|