Skip to content

Commit

Permalink
[Inference API] Improve chunked results error message (elastic#115807)
Browse files Browse the repository at this point in the history
* Improve chunked results error message

* Update RestStatus to conflict

* precommit

* Update docs/changelog/115807.yaml

(cherry picked from commit 6742147)
  • Loading branch information
maxhniebergall committed Oct 30, 2024
1 parent 99196cb commit b5f5d70
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions docs/changelog/115807.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 115807
summary: "[Inference API] Improve chunked results error message"
area: Machine Learning
type: enhancement
issues: []
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ public class ResultUtils {

public static ElasticsearchStatusException createInvalidChunkedResultException(String expectedResultName, String receivedResultName) {
return new ElasticsearchStatusException(
"Expected a chunked inference [{}] received [{}]",
RestStatus.INTERNAL_SERVER_ERROR,
"Received incompatible results. Check that your model_id matches the task_type of this endpoint. "
+ "Expected chunked output of type [{}] but received [{}].",
RestStatus.CONFLICT,
expectedResultName,
receivedResultName
);
Expand Down

0 comments on commit b5f5d70

Please sign in to comment.