Skip to content

Commit 0f1e03f

Browse files
authored
Merge pull request #96 from CMSgov/BB2-4376-v3-changes
Bb2 4376 v3 changes
2 parents eae8ca8 + d0b0deb commit 0f1e03f

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ node_modules
33

44
# build trash
55
server/dist
6+
server/node-sdk
67

78
# testing
89
coverage
@@ -30,4 +31,8 @@ sandbox.env
3031

3132
config.ts
3233
.bluebutton-config.json
33-
client/yarn.lock
34+
package-lock.json
35+
yarn.lock
36+
37+
# Snyk Security Extension - AI Rules (auto-generated)
38+
.github/instructions/snyk_rules.instructions.md

server/index.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,18 @@ app.get("/api/bluebutton/callback", (req: Request, res: Response) => {
8181
// access token can expire, SDK automatically refresh access token when that happens.
8282
const eobResults = await bb.getExplanationOfBenefitData(authToken);
8383
authToken = eobResults.token; // in case authToken got refreshed during fhir call
84-
84+
8585
loggedInUser.authToken = authToken;
8686

8787
loggedInUser.eobData = eobResults.response?.data;
88-
} catch (e) {
88+
} catch (e: any) {
8989
loggedInUser.eobData = {};
9090
process.stdout.write(ERR_QUERY_EOB + '\n');
9191
process.stderr.write("Exception: " + String(e) + '\n');
92+
if (e.response) {
93+
console.log("Error status:", e.response.status);
94+
console.log("Error data:", e.response.data);
95+
}
9296
}
9397
} else {
9498
clearBB2Data();

0 commit comments

Comments
 (0)