Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while trying to call any methods in IBM ACD nodejs sdk #20

Open
Haroon-KA opened this issue Sep 24, 2020 · 0 comments
Open

Error while trying to call any methods in IBM ACD nodejs sdk #20

Haroon-KA opened this issue Sep 24, 2020 · 0 comments

Comments

@Haroon-KA
Copy link

Bug description:
Getting the below mentioned error while trying to call the getProfiles method:
error { Error: read ECONNRESET
at RequestWrapper.formatError (/home/ubuntu/NLP/ibm_acd/node_modules/ibm-cloud-sdk-core/lib/request-wrapper.js:223:21)
at /home/ubuntu/NLP/ibm_acd/node_modules/ibm-cloud-sdk-core/lib/request-wrapper.js:211:25
at process._tickCallback (internal/process/next_tick.js:68:7)
message: 'read ECONNRESET',
statusText: 'ECONNRESET',
body:
'Response not received - no connection was made to the service.' }

This is the code snippet I am using:
const AnnotatorForClinicalDataAcdV1 = require('ibm-whcs-sdk/annotator-for-clinical-data/v1');
const core = require('ibm-cloud-sdk-core');
const { IamAuthenticator } = core;

const ACD = new AnnotatorForClinicalDataAcdV1({
version: '{actual version}',
headers: {
"Content-Type": "text/plain",
"accept": "application/json"
},
disableSslVerification: true,

authenticator: new IamAuthenticator({
apikey: '{ibm provided api key}'
}),
serviceUrl: '{ibm provided service url}'
});

const params = {};
ACD.getProfiles(params)
.then(response => {
console.log(JSON.stringify(response.result, null, 2));
})
.catch(err => {
console.log('error', err);
});

Expectation: A valid response should have been obtained

Must gather (please complete the following information):

  • SDK Version - 0.1.0
  • Node Version > 10
  • Name of service that you're trying to use (if applicable) - getProfiles
  • Name of operation that you're trying to invoke (if applicable) - getProfiles

Additional context
Add any other context about the problem here.
Were you able to avoid the problem by changing your application code slightly?

@Haroon-KA Haroon-KA changed the title Error while trying to fetch profiles Error while trying to call any methods in IBM ACD nodejs sdk Sep 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant