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

Run Command and set up #126

Open
ravimantra opened this issue Nov 25, 2019 · 0 comments
Open

Run Command and set up #126

ravimantra opened this issue Nov 25, 2019 · 0 comments

Comments

@ravimantra
Copy link

ravimantra commented Nov 25, 2019

I am writing it very first time, having a resolver like

const getCountries = (context) => {
const { cookies = {}, traceId } = context;
const httpClient = new HttpClient(
cookies[OAUTH_ACCESS_TOKEN], true,
{
TraceId: traceId
}
);

const url = URL.RESOURCES.SERVICE_URL.GET_COUNTRIES_URL;
return httpClient.restService('get', url)
.then((response) => {
logger.info(response.body)
return response.body;
})
.catch((error) => {
logger.info("Error in getting issue suggestions", JSON.stringify(error));
const { httpDetails:{ statusCode } } = error
return { statusCode };
});
};

module.exports = getCountries;

Could you please let me know, what would be best way to write it. I am not able to see the commands in the document to run the test cases.

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