attlaz-client 1.9.30 → 1.9.31

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.
@@ -83,7 +83,7 @@ class ChannelEndpoint extends Endpoint_1.Endpoint {
83
83
  const result = await this.requestObject(url, subscriberChannel, Channel_1.Channel.parse, 'POST');
84
84
  const updatedChannel = result.getData();
85
85
  if (updatedChannel === null) {
86
- throw new Error('Channel not updated');
86
+ throw new Error('Unable to update channel: wrong response from API');
87
87
  }
88
88
  return updatedChannel;
89
89
  }
@@ -104,7 +104,7 @@ class ChannelEndpoint extends Endpoint_1.Endpoint {
104
104
  const re = result.getData();
105
105
  if (re === null) {
106
106
  console.log('testChannel wrong data', { result, parsed: re });
107
- throw new Error('Something went wrong');
107
+ throw new Error('Unable to test channel: wrong response from API');
108
108
  }
109
109
  return re.tested;
110
110
  }
@@ -70,7 +70,7 @@ class LogEndpoint extends Endpoint_1.Endpoint {
70
70
  const re = result.getData();
71
71
  if (re === null) {
72
72
  console.log('delete log entry wrong data', { result, parsed: re });
73
- throw new Error('Something went wrong');
73
+ throw new Error('Unable to delete log entry: wrong response from API');
74
74
  }
75
75
  return re.deleted;
76
76
  }
@@ -91,7 +91,7 @@ class LogEndpoint extends Endpoint_1.Endpoint {
91
91
  const re = result.getData();
92
92
  if (re === null) {
93
93
  console.log('Log stream cleared wrong data', { result, parsed: re });
94
- throw new Error('Something went wrong');
94
+ throw new Error('Unable to clear log stream: wrong response from API');
95
95
  }
96
96
  return re.cleared;
97
97
  }
@@ -26,7 +26,7 @@ class NotificationsEndpoint extends Endpoint_1.Endpoint {
26
26
  const result = await this.requestObject('/notifications', notification, parser, 'POST');
27
27
  const savedNotification = result.getData();
28
28
  if (savedNotification === null) {
29
- throw new Error('Something went wrong');
29
+ throw new Error('Unable to save notification: wrong response from API');
30
30
  }
31
31
  return savedNotification;
32
32
  }
@@ -37,7 +37,7 @@ class StorageEndpoint extends Endpoint_1.Endpoint {
37
37
  const re = result.getData();
38
38
  if (re === null) {
39
39
  console.log('clearpool wrong data', { result, parsed: re });
40
- throw new Error('Something went wrong');
40
+ throw new Error('Unable to clear storage pool: wrong response from API');
41
41
  }
42
42
  return re.deleted;
43
43
  }
@@ -81,7 +81,7 @@ class StorageEndpoint extends Endpoint_1.Endpoint {
81
81
  const savedItem = result.getData();
82
82
  if (savedItem === null) {
83
83
  console.log('Storage set item wrong data', { result, parsed: savedItem });
84
- throw new Error('Something went wrong');
84
+ throw new Error('Unable to save storage item: wrong response from API');
85
85
  }
86
86
  return savedItem;
87
87
  }
@@ -102,7 +102,7 @@ class StorageEndpoint extends Endpoint_1.Endpoint {
102
102
  const x = result.getData();
103
103
  if (x === null) {
104
104
  console.log('Storage delete item wrong data', { result, parsed: x });
105
- throw new Error('Something went wrong');
105
+ throw new Error('Unable to delete storage item: wrong response from API');
106
106
  }
107
107
  return x.deleted;
108
108
  }
@@ -39,7 +39,7 @@ class TriggerEndpoint extends Endpoint_1.Endpoint {
39
39
  const result = await this.requestObject(url, trigger, Trigger_1.Trigger.parse, 'POST');
40
40
  const createdTrigger = result.getData();
41
41
  if (createdTrigger === null) {
42
- throw new Error('Trigger not created');
42
+ throw new Error('Unable save trigger: wrong response from API');
43
43
  }
44
44
  return createdTrigger;
45
45
  }
@@ -22,7 +22,7 @@ class UserEndpoint extends Endpoint_1.Endpoint {
22
22
  const token = result.getData();
23
23
  if (token === null) {
24
24
  console.log('auth by auth provider wrong data', { result, parsed: token });
25
- throw new Error('Something went wrong');
25
+ throw new Error('Unable to authenticate by auth provider: wrong response from API');
26
26
  }
27
27
  return token;
28
28
  }
@@ -58,7 +58,7 @@ class UserEndpoint extends Endpoint_1.Endpoint {
58
58
  const re = result.getData();
59
59
  if (re === null) {
60
60
  console.log('remove auth provider wrong data', { result, parsed: re });
61
- throw new Error('Something went wrong');
61
+ throw new Error('Unable to remove auth provider: wrong response from API');
62
62
  }
63
63
  return re.deleted;
64
64
  }
@@ -130,7 +130,7 @@ class UserEndpoint extends Endpoint_1.Endpoint {
130
130
  const re = result.getData();
131
131
  if (re === null) {
132
132
  console.log('reset password request wrong data', { result, parsed: re });
133
- throw new Error('Something went wrong');
133
+ throw new Error('Unable to request password reset: wrong response from API');
134
134
  }
135
135
  return re.requested;
136
136
  }
@@ -151,7 +151,7 @@ class UserEndpoint extends Endpoint_1.Endpoint {
151
151
  const re = result.getData();
152
152
  if (re === null) {
153
153
  console.log('reset password wrong data', { result, parsed: re });
154
- throw new Error('Something went wrong');
154
+ throw new Error('Unable to reset password: wrong response from API');
155
155
  }
156
156
  return re.updated;
157
157
  }
@@ -48,7 +48,7 @@ class WorkspaceMemberEndpoint extends Endpoint_1.Endpoint {
48
48
  const re = result.getData();
49
49
  if (re === null) {
50
50
  console.log('invite member wrong data', { result, parsed: re });
51
- throw new Error('Something went wrong');
51
+ throw new Error('Unable invite member: wrong response from API');
52
52
  }
53
53
  // if (Utils.isNullOrUndefined(result)) {
54
54
  // return null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "attlaz-client",
3
- "version": "1.9.30",
3
+ "version": "1.9.31",
4
4
  "description": "Javascript Client to access Attlaz API",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",