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

Handle error from API on search e2e tests #1268

Merged
merged 3 commits into from
Nov 27, 2023

Conversation

eminano
Copy link
Contributor

@eminano eminano commented Nov 27, 2023

The aggregate endpoint can now return a 404 if the underlying opensearch schema doesn't exist. This can happen if the table is created and immediately queried, since it needs time to replicate through pgstream.
This PR adds a try/catch to make sure errors returned from the API don't stop the indexing wait loop.

@eminano eminano requested a review from a team as a code owner November 27, 2023 17:08
Copy link

changeset-bot bot commented Nov 27, 2023

⚠️ No Changeset found

Latest commit: 30dba40

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 27, 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]

Copy link
Contributor

github-actions bot commented Nov 27, 2023

size-limit report 📦

Path Size
packages/client/dist/index.mjs 15.77 KB (0%)
packages/client/dist/index.cjs 16.9 KB (0%)
packages/codegen/dist/index.mjs 1.95 MB (0%)
packages/codegen/dist/index.cjs 1.95 MB (0%)

Copy link
Member

@SferaDev SferaDev left a comment

Choose a reason for hiding this comment

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

Thanks! Looks good, added a very minor suggestion to avoid repeating the retry logic, but it's up to you to implement it.

test/integration/aggregate.test.ts Outdated Show resolved Hide resolved
@eminano eminano added this pull request to the merge queue Nov 27, 2023
Merged via the queue into main with commit 6278e96 Nov 27, 2023
6 checks passed
@eminano eminano deleted the handle-indexing-error-on-search-tests branch November 27, 2023 17:42
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.

2 participants