@smartico/public-api 0.0.270 → 0.0.271

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartico/public-api",
3
- "version": "0.0.270",
3
+ "version": "0.0.271",
4
4
  "description": "Smartico public API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -5,8 +5,7 @@ export enum AchCustomSectionType {
5
5
  LEVELS = 4,
6
6
  MINI_GAMES = 5,
7
7
  MISSION_CUSTOM_LAYOUT = 6,
8
- MATCH_X = 7,
9
- QUIZ = 8,
8
+ MATCH_X_AND_QUIZ = 7,
10
9
  REDIRECT_LINK = 9,
11
10
  LOOTBOX_WEEKLY = 10,
12
11
  LOOTBOX_CALENDAR_DAYS = 11,
@@ -263,6 +263,11 @@ class SmarticoAPI {
263
263
  try {
264
264
  const timeStart = new Date().getTime();
265
265
  result = await this.messageSender(message, this.publicUrl, expectCID);
266
+
267
+ if (result.errCode && result.errSetup) {
268
+ throw new Error(result.errMessage);
269
+ }
270
+
266
271
  result = SmarticoAPI.replaceSmrDomainsWithCloudfront(result);
267
272
  const timeEnd = new Date().getTime();
268
273