Skip to content

Commit f522be8

Browse files
authored
Enhance error message in Raw Request action
1 parent 0a10857 commit f522be8

File tree

5 files changed

+15
-11
lines changed

5 files changed

+15
-11
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 2.8.6 (January 31, 2025)
2+
* Upgrade Sailor version to 2.7.4
3+
* Enhanced error message text in the `Raw Request` action
4+
15
## 2.8.5 (October 09, 2024)
26
* Fixed issues in `Get New and Updated Objects Polling` trigger:
37
* Emit only one batch of messages if results are more than 10000

component.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "Customer relationship management (CRM) software & cloud computing from the leader in CRM solutions for businesses large & small.",
44
"docsUrl": "https://github.com/elasticio/salesforce-component-v2",
55
"url": "https://www.salesforce.com/",
6-
"version": "2.8.5",
6+
"version": "2.8.6",
77
"authClientTypes": [
88
"oauth2"
99
],

lib/actions/rawRequest.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const axios = require('axios');
22
const fs = require('fs');
33
const { messages } = require('elasticio-node');
4-
const { Logger } = require('@elastic.io/component-commons-library');
4+
const { Logger, getErrMsg } = require('@elastic.io/component-commons-library');
55
const common = require('../common.js');
66
const { getSecret, refreshToken } = require('../util');
77

@@ -62,7 +62,6 @@ async function processAction(msg, cfg) {
6262
logger.info('Method %s was successfully executed', method);
6363
break;
6464
} catch (e) {
65-
logger.error('Got error %s', e.name || '');
6665
if (e.name === 'INVALID_SESSION_ID') {
6766
try {
6867
logger.debug('Session is expired, trying to refresh token...');
@@ -72,6 +71,7 @@ async function processAction(msg, cfg) {
7271
logger.error('Failed to refresh token');
7372
}
7473
} else {
74+
if (e.response) throw new Error(getErrMsg(e.response));
7575
throw e;
7676
}
7777
}

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"dotenv": "16.1.4",
3737
"elasticio-node": "0.0.9",
3838
"elasticio-rest-node": "1.2.7",
39-
"elasticio-sailor-nodejs": "2.7.3",
39+
"elasticio-sailor-nodejs": "2.7.4",
4040
"jsforce": "1.11.1"
4141
},
4242
"devDependencies": {

0 commit comments

Comments
 (0)