-
Notifications
You must be signed in to change notification settings - Fork 33
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 split terminal bug #267
Fix split terminal bug #267
Conversation
src/stripeTerminal.ts
Outdated
const terminal = await this.createNewSplitTerminal(); | ||
if (!terminal) { | ||
throw new Error('Failed to split Stripe terminal'); |
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 say try again on error? I'm slightly confused what a Stripe terminal is. What do you think?
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 don't think we want to retry because to reach this exception, then something very wrong must have happened.
A Stripe terminal is a vscode terminal whose sole purpose is to run stripe
commands. I'm not sure if there's a better name for it, happy to change it if you have any suggestions.
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.
Oops sorry, I misread your comment - yeah we can say try again on error! And then we won't have to mention anything about a stripe terminal.
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.
LGTM, slight change on the wording maybe?
@@ -61,7 +61,7 @@ export class StripeTerminal { | |||
if (this.terminals.length > 0) { | |||
const terminal = await this.createNewSplitTerminal(); | |||
if (!terminal) { | |||
throw new Error('Failed to split Stripe terminal'); | |||
throw new Error('Failed to create a terminal for this Stripe command. Please try again.'); |
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.
Amazing!
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.
LGTM
fixes #266
See the linked issue for an explanation.