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 split terminal bug #267

Merged

Conversation

vcheung-stripe
Copy link
Collaborator

fixes #266

See the linked issue for an explanation.

const terminal = await this.createNewSplitTerminal();
if (!terminal) {
throw new Error('Failed to split Stripe terminal');
Copy link
Contributor

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?

Copy link
Collaborator Author

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.

Copy link
Collaborator Author

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.

ctrudeau-stripe
ctrudeau-stripe previously approved these changes Jun 9, 2021
Copy link
Contributor

@ctrudeau-stripe ctrudeau-stripe left a 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.');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing!

Copy link
Contributor

@ctrudeau-stripe ctrudeau-stripe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :shipit:

@vcheung-stripe vcheung-stripe merged commit 77d44ac into stripe:master Jun 9, 2021
@vcheung-stripe vcheung-stripe deleted the vcheung/split-terminal-fix branch June 9, 2021 00:27
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.

Bug in split terminal when you "Forward events ..." more than once
2 participants