Open
Description
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.
Metadata
Metadata
Assignees
Labels
No labels