@dronedeploy/rocos-js-sdk 4.3.0-rc.1 → 4.3.1
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.
|
@@ -33,5 +33,9 @@ export declare const errorCodes: {
|
|
|
33
33
|
export declare class RocosError extends Error {
|
|
34
34
|
code?: string;
|
|
35
35
|
statusCode?: number;
|
|
36
|
+
/** Raw server response body, when this error originated from an HttpError-wrapped HTTP failure. */
|
|
37
|
+
payload?: string;
|
|
38
|
+
/** The original HTTP Response, when available. */
|
|
39
|
+
response?: Response;
|
|
36
40
|
constructor(err: string | Error, code?: string, statusCode?: number);
|
|
37
41
|
}
|
package/cjs/models/RocosError.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RocosError = exports.errorCodes = void 0;
|
|
4
|
+
const HttpError_1 = require("./HttpError");
|
|
4
5
|
exports.errorCodes = {
|
|
5
6
|
SKD_ERROR: 'SKD_ERROR',
|
|
6
7
|
AUTH_ERROR: 'AUTH_ERROR',
|
|
@@ -45,6 +46,10 @@ class RocosError extends Error {
|
|
|
45
46
|
}
|
|
46
47
|
this.code = code;
|
|
47
48
|
this.statusCode = statusCode;
|
|
49
|
+
if (err instanceof HttpError_1.HttpError) {
|
|
50
|
+
this.payload = err.payload;
|
|
51
|
+
this.response = err.response;
|
|
52
|
+
}
|
|
48
53
|
}
|
|
49
54
|
}
|
|
50
55
|
exports.RocosError = RocosError;
|
|
@@ -33,5 +33,9 @@ export declare const errorCodes: {
|
|
|
33
33
|
export declare class RocosError extends Error {
|
|
34
34
|
code?: string;
|
|
35
35
|
statusCode?: number;
|
|
36
|
+
/** Raw server response body, when this error originated from an HttpError-wrapped HTTP failure. */
|
|
37
|
+
payload?: string;
|
|
38
|
+
/** The original HTTP Response, when available. */
|
|
39
|
+
response?: Response;
|
|
36
40
|
constructor(err: string | Error, code?: string, statusCode?: number);
|
|
37
41
|
}
|
package/esm/models/RocosError.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { HttpError } from './HttpError';
|
|
1
2
|
export const errorCodes = {
|
|
2
3
|
SKD_ERROR: 'SKD_ERROR',
|
|
3
4
|
AUTH_ERROR: 'AUTH_ERROR',
|
|
@@ -42,5 +43,9 @@ export class RocosError extends Error {
|
|
|
42
43
|
}
|
|
43
44
|
this.code = code;
|
|
44
45
|
this.statusCode = statusCode;
|
|
46
|
+
if (err instanceof HttpError) {
|
|
47
|
+
this.payload = err.payload;
|
|
48
|
+
this.response = err.response;
|
|
49
|
+
}
|
|
45
50
|
}
|
|
46
51
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dronedeploy/rocos-js-sdk",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.1",
|
|
4
4
|
"description": "Javascript SDK for rocos",
|
|
5
5
|
"main": "cjs/index.js",
|
|
6
6
|
"module": "esm/index.js",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"sideEffects": false,
|
|
20
20
|
"author": "DroneDeploy <support@dronedeploy.com> (https://www.dronedeploy.com/)",
|
|
21
21
|
"scripts": {},
|
|
22
|
-
"license": "
|
|
22
|
+
"license": "UNLICENSED",
|
|
23
23
|
"devDependencies": {},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@bufbuild/protobuf": "2.12.0",
|