Skip to content

Commit

Permalink
Provide the latest Salesforce REST API version (v62.0) when setting u…
Browse files Browse the repository at this point in the history
…p the Salesforce connection
  • Loading branch information
courtneymyers committed Jan 10, 2025
1 parent 6badabe commit a53777e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app/server/app/utilities/bap.js
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,7 @@ const {
*/
function setupConnection(req) {
const bapConnection = new jsforce.Connection({
version: "62.0",
oauth2: {
clientId: BAP_CLIENT_ID,
clientSecret: BAP_CLIENT_SECRET,
Expand Down Expand Up @@ -1913,8 +1914,15 @@ function verifyBapConnection(req, { name, args }) {
const logMessage = `BAP Error: ${err}.`;
log({ level: "error", message: logMessage, req, otherInfo: err });

// TODO: Handle the following error:
// Error: Unable to refresh session due to: No refresh token found in the connection.

if (err?.includes("No refresh token found in the connection.")) {
log({ level: "info", message: "Re-establishing BAP connection.", req });

// Re-establish the BAP connection.
}

throw err;
});
}
Expand Down

0 comments on commit a53777e

Please sign in to comment.