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: better branch create error #1243

Merged
merged 2 commits into from
Nov 20, 2023
Merged

fix: better branch create error #1243

merged 2 commits into from
Nov 20, 2023

Conversation

eemmiillyy
Copy link
Contributor

Resolves #1238

Copy link

changeset-bot bot commented Nov 8, 2023

⚠️ No Changeset found

Latest commit: 901301b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

github-actions bot commented Nov 8, 2023

size-limit report 📦

Path Size
packages/client/dist/index.mjs 17.97 KB (0%)
packages/client/dist/index.cjs 19.32 KB (0%)
packages/codegen/dist/index.mjs 2.58 MB (0%)
packages/codegen/dist/index.cjs 2.58 MB (0%)

Copy link
Contributor

github-actions bot commented Nov 8, 2023

Your pull request has been published to npm.

You can install @xata.io/client by running:

npm install @xata.io/[email protected]

Other packages are published like this:

npm install @xata.io/[email protected]

To test the CLI, run:

npx @xata.io/[email protected]

this.success(message);
} catch (err) {
err instanceof Error
? this.error(`${err.message.includes('Unexpected token < in JSON') ? 'Failed to create branch' : err.message}`)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Checking for the string that we know if thrown during a timeout. Could alternatively override all error messages from backend but I figured that some of them may actually be useful.

@eemmiillyy eemmiillyy marked this pull request as ready for review November 10, 2023 09:09
@eemmiillyy eemmiillyy requested a review from a team as a code owner November 10, 2023 09:09
@eemmiillyy eemmiillyy added this pull request to the merge queue Nov 20, 2023
Merged via the queue into main with commit 49db994 Nov 20, 2023
@eemmiillyy eemmiillyy deleted the fix/branch-error branch November 20, 2023 15:12
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.

Gracefully handle gateway timeouts when creating branches
2 participants