[ML] Remove error parsing functionality for custom service#128778
Merged
jonathan-buttner merged 9 commits intoelastic:mainfrom Jun 18, 2025
Merged
[ML] Remove error parsing functionality for custom service#128778jonathan-buttner merged 9 commits intoelastic:mainfrom
jonathan-buttner merged 9 commits intoelastic:mainfrom
Conversation
Collaborator
|
Pinging @elastic/ml-core (Team:ML) |
| public CustomResponseHandler(String requestType, ResponseParser parseFunction, ErrorResponseParser errorParser) { | ||
| super(requestType, parseFunction, errorParser); | ||
| private static final Function<HttpResult, ErrorResponse> ERROR_PARSER = (httpResult) -> new ErrorResponse( | ||
| new String(httpResult.body(), StandardCharsets.UTF_8) |
Member
There was a problem hiding this comment.
Is there any case where this might fail to parse and we'd want some sort of generic fallback string? From the java docs it seems "The behavior of this constructor when the given bytes are not valid in the given charset is unspecified." (here) so I'm not quite clear on how this might react if it can't parse the bytes.
Contributor
Author
There was a problem hiding this comment.
Yeah good point, I'll wrap it in a try/catch and return something generic 👍
Collaborator
💔 Backport failed
You can use sqren/backport to manually backport by running |
Contributor
Author
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
kderusso
pushed a commit
to kderusso/elasticsearch
that referenced
this pull request
Jun 23, 2025
…28778) * Remove error parsing class * Adding test for lack of error parsing logic * Adding transport version check * Wrapping string in try/catch and adding test
mridula-s109
pushed a commit
to mridula-s109/elasticsearch
that referenced
this pull request
Jun 25, 2025
…28778) * Remove error parsing class * Adding test for lack of error parsing logic * Adding transport version check * Wrapping string in try/catch and adding test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR addresses the feedback item from the original PR: #127939
This PR removes the error parsing functionality and instead converts the entire error to a string.
Comments:
#127939 (comment)