-
Notifications
You must be signed in to change notification settings - Fork 24
Batch 12 of #2285, converting shredding-related ErrorCodeV1 entries
#2322
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
Changes from all commits
c6b473e
348226d
b484ee4
68bb2d0
4f568de
276a2b0
51b5c5b
f57f9b1
7746144
d59e4c3
72d474e
f9d2645
ae4e795
fb4af3b
9c8a0c8
6ec6cdd
35bfa03
6bd5029
84668a8
bb026a2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,7 +4,6 @@ | |
| import io.smallrye.config.ConfigMapping; | ||
| import io.smallrye.config.WithConverter; | ||
| import io.smallrye.config.WithDefault; | ||
| import io.stargate.sgv2.jsonapi.exception.ErrorCodeV1; | ||
| import io.stargate.sgv2.jsonapi.service.provider.ApiModelSupport; | ||
| import jakarta.annotation.Nullable; | ||
| import jakarta.inject.Inject; | ||
|
|
@@ -207,7 +206,10 @@ public static ValidationType fromString(String type) { | |
| } else if (type.equals("options")) { | ||
| return OPTIONS; | ||
| } | ||
| throw ErrorCodeV1.INVALID_PARAMETER_VALIDATION_TYPE.toApiException(type); | ||
| throw new IllegalArgumentException( | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. One-off failure not to be directly exposed: caller will wrap/convert validation problems in more centralized way.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am guessing we only need this stuff because of the EGW and the trouble we have with configs ?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not sure why this was added: I don't think non-contextual, Enum lookups should throw Data API exceptions; they can't add much context information. I'll see what caller does.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Uh. It's called from just one place but that's a Record constructor in will leave as-is, for now. |
||
| "Invalid `ValidationType` value ('" | ||
| + type | ||
| + "') for `EmbeddingProvidersConfig`: expected either 'numericRange' or 'options'"); | ||
| } | ||
|
|
||
| @Override | ||
|
|
||
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.
we dont have any BAD error codes in V2 errors - we can let them through and then I can fix in a follow up ? as in they take some thinking do we want to do that now ?
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.
Agreed, postpone for now to give us more time to think it through.