@rtsdk/topia 0.0.21 → 0.0.23

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.
@@ -22,6 +22,7 @@ export class Topia {
22
22
  this.apiDomain = apiDomain || "api.topia.io";
23
23
  this.interactiveSecret = interactiveSecret;
24
24
  const headers = {
25
+ "ApplicationId": "sdk-js-topia",
25
26
  "Content-Type": "application/json",
26
27
  };
27
28
  if (apiKey)
package/package.json CHANGED
@@ -22,7 +22,7 @@
22
22
  "jsonwebtoken": "^9.0.0",
23
23
  "prettier": "^2.7.1",
24
24
  "rollup": "^3.4.0",
25
- "rollup-plugin-terser": "^7.0.2",
25
+ "rollup-plugin-license": "^3.0.1",
26
26
  "rollup-plugin-typescript2": "^0.34.1",
27
27
  "ts-jest": "^29.0.3",
28
28
  "typedoc": "^0.23.23",
@@ -34,7 +34,7 @@
34
34
  ],
35
35
  "gitHead": "7eef1f7fd9b3b0af395f95cb908add3011abf808",
36
36
  "homepage": "https://github.com/metaversecloud-com/mc-sdk-js/tree/main/clients/client-topia",
37
- "license": "ISC",
37
+ "license": "bsd-3-clause",
38
38
  "keywords": [],
39
39
  "name": "@rtsdk/topia",
40
40
  "main": "dist/index.js",
@@ -56,5 +56,5 @@
56
56
  "local-publish": "yarn build && yalc publish --push --no-scripts"
57
57
  },
58
58
  "type": "module",
59
- "version": "0.0.21"
59
+ "version": "0.0.23"
60
60
  }
@@ -1,22 +0,0 @@
1
- /**
2
- * Parses error object and returns message if available, otherwise returns generic error message.
3
- */
4
- import { AxiosError } from "axios";
5
- export const getErrorResponse = ({ error, message = "Something went wrong. Please try again or contact support.", }) => {
6
- var _a;
7
- let data = {}, errorMessage = message, status = 500, url = "unknown";
8
- if (error instanceof AxiosError) {
9
- errorMessage = (error === null || error === void 0 ? void 0 : error.message) || message;
10
- if (error.response) {
11
- status = error.response.status;
12
- data = error.response.data;
13
- }
14
- if ((_a = error === null || error === void 0 ? void 0 : error.config) === null || _a === void 0 ? void 0 : _a.url)
15
- url = error.config.url;
16
- }
17
- else if (error instanceof Error) {
18
- errorMessage = (error === null || error === void 0 ? void 0 : error.message) || message;
19
- }
20
- errorMessage = `${errorMessage}. Please surround your use of the RTSDK with a try/catch block.`;
21
- return { success: false, status, url, message: errorMessage, data };
22
- };