Skip to content

Conversation

@jonathan-buttner
Copy link
Contributor

This PR refactors the error handling logic within the inference API to remove some error handling code that is no longer needed after a previous refactoring PR.

Prior to this PR: #123076 we needed to check for the presence of an error object in the response from a 3rd party service. We needed to do this because some services would return a 200 and not label the message as an error within the SSE. So we would check if the body of the response looked like an error and if so we'd parse it as an error and return a failure.

After the retrying work for streaming we moved the structure check within the streaming parsing logic and no longer need to do it within the BaseResponseHandler.

@jonathan-buttner jonathan-buttner added >refactoring :ml Machine learning Team:ML Meta label for the ML team v9.2.0 labels Aug 6, 2025
@jonathan-buttner jonathan-buttner marked this pull request as ready for review August 6, 2025 14:47
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/ml-core (Team:ML)

@jonathan-buttner jonathan-buttner merged commit de4245c into elastic:main Aug 11, 2025
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:ml Machine learning >refactoring Team:ML Meta label for the ML team v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants