Skip to content
This repository was archived by the owner on Dec 14, 2022. It is now read-only.

Commit 6715bc5

Browse files
author
Chris Wiechmann
committed
IT-Test debugging
1 parent be31984 commit 6715bc5

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

apibuilder4elastic/custom_flow_nodes/api-builder-plugin-axway-api-management/src/actions.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ async function lookupCurrentUser(params, options) {
8787
// Might happen if the request has been sent to the wrong ANM by a Load-Balancer in between. (Session Stickyness not working as expected)
8888
// With that, the session cookie sent is not known
8989
// Only mitigating the problem, but not really fully solving the issue - Load-Balanced request must be investigated
90-
logger.warn(`Unexpected error while trying to get current user from the ANM. Using a Load-Balancer which is not sticky?! Try again at least once.`);
91-
logger.debug(`Received error: ${JSON.stringify(err)}`);
90+
logger.warn(`Unexpected error while trying to get current user from the ANM. (Perhaps using a Load-Balancer bteween APIBuilder4Elastic and Admin-Node-Manager which is not sticky?!). Trying again ...`);
91+
logger.debug(`Exception message error: ${JSON.stringify(err)}`);
9292
user.loginName = await _getCurrentGWUser(headers = {'Cookie': requestHeaders.cookie}, region, logger);
9393
}
9494
logger.trace(`Current user is: ${user.loginName}`);

apibuilder4elastic/test/trafficMonitorAPI/restricted/http/test_search_restricted.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ describe('Endpoints', function () {
2323
return new Promise(function(resolve, reject){
2424
delete process.env.AUTHZ_CONFIG; // Make sure, it is not using from a previous test
2525
const envFilePath = path.join(__dirname, '../../../.env');
26-
if (fs.existsSync(envFilePath)) {
27-
envLoader.config({ path: envFilePath });
26+
const envLoadResult = envLoader.config({ path: envFilePath });
27+
if (envLoadResult.error) {
28+
throw envLoadResult.error;
2829
}
2930
server = startApiBuilder();
3031
server.apibuilder.config.testElasticIndex = indexName;

0 commit comments

Comments
 (0)