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 #1098: prevent NPE for unknown embedding provider id #1099

Merged
merged 4 commits into from
May 17, 2024

Conversation

tatu-at-datastax
Copy link
Contributor

What this PR does:

Adds null checks to avoid NPE.

Which issue(s) this PR fixes:
Fixes #1098

Checklist

  • Changes manually tested
  • Automated Tests added/updated
  • Documentation added/updated
  • CLA Signed: DataStax CLA

@tatu-at-datastax tatu-at-datastax self-assigned this May 16, 2024
} catch (Exception e) {
throw new JsonApiException(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Refactored so that "JsonApiException" just thrown is not caught, wrapped, re-thrown.

@tatu-at-datastax tatu-at-datastax marked this pull request as ready for review May 17, 2024 01:20
@tatu-at-datastax tatu-at-datastax requested a review from a team as a code owner May 17, 2024 01:20
@tatu-at-datastax tatu-at-datastax merged commit 68fe36b into main May 17, 2024
3 checks passed
@tatu-at-datastax tatu-at-datastax deleted the tatu/1098-embedding-provider-npe branch May 17, 2024 16:04
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.

Possible NPE in EmbeddingProviderFactory for mismatched/missing embedding provider id
2 participants