-
Notifications
You must be signed in to change notification settings - Fork 66
Update HTTP timeout error messaging #1419
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
Conversation
const config = getConfig(); | ||
const defaultTimeout = config?.httpTimeout; | ||
|
||
if (error.timeout && defaultTimeout === error.timeout) { |
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.
Checking this to make sure the message doesn't get displayed in cases where we explicitly set a timeout
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.
Should we still have some sort of error override, even if we manually adjusted the timeout?
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.
Good question, I was thinking we'd just handle that on a case by case basis anywhere where we suspect it could be an issue (which is few or zero places as far as i know)
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.
Ah I see what you mean. My guess is that it would be fine to open this up to apply to all timeouts, but what you have is an improvement regardless. You can make the call to keep or remove the extra check
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.
Ohh I was just trying to avoid the case where we manually set a timeout somewhere and then a user tries to fix an error with hs config set
but it doesn't work. I'll add a generic message for when that's the case
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.
I didn't think about that. Then yeah +1 to keeping this in 👌
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.
Might be worth adding a comment so we don't forget that years from now lol
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.
Just one question about how we handle the error in cases where we adjusted the timeout, but it's not blocking. This lgtm 👌
Description and Context
HTTP timeout errors on the CLI are usually easy to solve by increasing timeout with
hs config set
, but we don't give users any guidance towards doing that. This adds a helpful message for all timeout errors that are triggered by the default timeout.Relies on this LDL PR: https://github.com/HubSpot/hubspot-local-dev-lib
Issue: https://git.hubteam.com/HubSpot/hubspot-cli-issues/issues/803
Screenshots
Before (unhelpful)

After (helpful)

Who to Notify
@brandenrodgers @joe-yeager @kemmerle