Skip to content

Commit

Permalink
feat: use new salesforce-setup.com domain
Browse files Browse the repository at this point in the history
  • Loading branch information
amtrack committed Dec 5, 2024
1 parent a54db3a commit a888669
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/browserforce.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export class Browserforce {
const result = await pRetry(
async () => {
page = await this.getNewPage();
const url = `${this.getInstanceUrl()}/${urlPath}`;
const url = `${this.getSetupUrl()}/${urlPath}`;
const response = await page.goto(url, options);
if (response) {
if (!response.ok()) {
Expand Down Expand Up @@ -124,6 +124,10 @@ export class Browserforce {
// sometimes the instanceUrl includes a trailing slash
return this.org.getConnection().instanceUrl?.replace(/\/$/, '');
}

public getSetupUrl(): string {
return this.getInstanceUrl().replace('.salesforce.com', '.salesforce-setup.com');
}
}

export async function throwPageErrors(page: Page): Promise<void> {
Expand Down

0 comments on commit a888669

Please sign in to comment.