-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sm/w 8206747 #347
Sm/w 8206747 #347
Conversation
src/connection.ts
Outdated
try { | ||
await conn.useLatestApiVersion(); | ||
} catch (e) { | ||
conn.logger.error(`Cannot connect to the org at ${conn.options?.connectionOptions?.instanceUrl}`); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
useLatestApiVersion also has a try/catch and it does not rethrow, so this try/catch seems unnecessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did some updates after Steve's feedback and a lot more e2e testing. That try/catch in useLatestApiVersion
is now more error-specific for DNS problems.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what other scenario would prevent us from being able to determine the version, though.
@mshanemc, while the new error message "Org Not Found" is a great clarification, it does change the existing output. Should Claire/Juliet be consulted on this change to the output? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approve pending comment resolution
@W-8206747@
I hate everything about this fix. From what I can tell, the stuff leaking into the stdout isn't from us, it's from jsforce > request > asap
Asap hasn't been updated in years and request is deprecated. This'll happen whenever jsforce.request tries to use a domain that no longer exists and gets a DNS ENOTFOUND.
You can most easily repo by creating a sandbox, authing to it, and then deleting it, and then waiting for a while for it to be destroyed.
After a few tries, the best option I could think of is to pre-check a DNS using our existing domainResolver. This required a number of updates to unit tests (where instanceUrl must exist to get past the pre-check). It was either that or a serious rewrite the tests in a major way.