Skip to content

Commit

Permalink
Merge pull request #505 from USEPA/feature/debug-bap-connection-issue
Browse files Browse the repository at this point in the history
Feature/debug bap connection issue
  • Loading branch information
courtneymyers authored Nov 26, 2024
2 parents 1c68633 + 58b5145 commit eba3c5c
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions app/server/app/utilities/bap.js
Original file line number Diff line number Diff line change
Expand Up @@ -1922,16 +1922,12 @@ function verifyBapConnection(req, { name, args }) {
return setupConnection(req).then(() => callback());
}

return bapConnection
.identity((err, _res) => {
if (err) {
const logMessage = `BAP connection identity error.`;
log({ level: "info", message: logMessage, req });
return bapConnection.identity().then((identityInfo) => {
const logMessage = `BAP Connection Info`;
log({ level: "info", message: logMessage, req, otherInfo: identityInfo });

return setupConnection(req).then(() => callback());
}
})
.then((_res) => callback());
return callback();
});
}

/**
Expand Down

0 comments on commit eba3c5c

Please sign in to comment.