mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-28 09:28:55 -04:00
[Inference API] Improve chunked results error message (#115807)
* Improve chunked results error message * Update RestStatus to conflict * precommit * Update docs/changelog/115807.yaml
This commit is contained in:
parent
d18824d4e6
commit
6742147d6a
2 changed files with 8 additions and 2 deletions
5
docs/changelog/115807.yaml
Normal file
5
docs/changelog/115807.yaml
Normal file
|
@ -0,0 +1,5 @@
|
|||
pr: 115807
|
||||
summary: "[Inference API] Improve chunked results error message"
|
||||
area: Machine Learning
|
||||
type: enhancement
|
||||
issues: []
|
|
@ -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
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue