Skip to content
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

fix: handle html server response #1015

Merged
merged 4 commits into from
Jan 9, 2024
Merged

fix: handle html server response #1015

merged 4 commits into from
Jan 9, 2024

Conversation

shetzel
Copy link
Contributor

@shetzel shetzel commented Jan 8, 2024

What does this PR do?

Handles an HTML response from the server and throws a helpful error. Also, if the error is just a string or doesn't have the data property set it handles it as well.

What issues does this PR fix or reference?

@W-14756399@

@shetzel shetzel requested a review from a team as a code owner January 9, 2024 17:20
mshanemc
mshanemc previously approved these changes Jan 9, 2024
@mshanemc
Copy link
Contributor

mshanemc commented Jan 9, 2024

QA: using yarn:link of this branch into plugin-auth

./bin/dev.js org login device --instance-url https://computing-connect-6970-dev-ed.scratch.my.salesforce.com/services/data/v50.0
Error (1): HTTP response contains html content. Check that the org exists and can be reached.

✅ good human error message
✅ json output contains the full html response in its data property.
Screenshot 2024-01-09 at 1 46 25 PM

❓ exitCode is 1.

@mshanemc mshanemc merged commit cda1acd into main Jan 9, 2024
66 checks passed
@mshanemc mshanemc deleted the sh/handle-html-response branch January 9, 2024 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants