{"record":{"id":"496ac478c84d06b1","repo":"weaviate/weaviate","slug":"failed-to-parse-summarization-response-status-d","errorCode":null,"errorMessage":"failed to parse summarization response (status %d): %w","messagePattern":"failed to parse summarization response \\(status (.+?)\\): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"modules/sum-transformers/client/client.go","lineNumber":85,"sourceCode":"\t\tbytes.NewReader(body))\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"create POST request\")\n\t}\n\n\tres, err := c.httpClient.Do(req)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"send POST request\")\n\t}\n\tdefer res.Body.Close()\n\n\tbodyBytes, err := io.ReadAll(res.Body)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"read response body\")\n\t}\n\n\tvar resBody sumResponse\n\tif err := json.Unmarshal(bodyBytes, &resBody); err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to parse summarization response (status %d): %w\", res.StatusCode, err)\n\t}\n\n\tif res.StatusCode > 399 {\n\t\treturn nil, errors.Errorf(\"fail with status %d: %s\", res.StatusCode, resBody.Error)\n\t}\n\n\tout := make([]ent.SummaryResult, len(resBody.Summary))\n\n\tfor i, elem := range resBody.Summary {\n\t\tout[i].Result = elem.Result\n\t\tout[i].Property = property\n\t}\n\n\t// format resBody to nerResult\n\treturn out, nil\n}\n\nfunc (c *client) url(path string) string {","sourceCodeStart":67,"sourceCodeEnd":103,"githubUrl":"https://github.com/weaviate/weaviate/blob/75aa4b6d11f8818305aafd4440b4e32794f7ca04/modules/sum-transformers/client/client.go#L67-L103","documentation":"Returned by the sum-transformers client when the JSON body from the summarization inference container cannot be unmarshaled into the expected sumResponse shape. Like the transformers reranker, parsing occurs before the status check, so non-JSON error bodies (HTML pages, crash tracebacks, empty bodies) at any status produce this message with the status embedded.","triggerScenarios":"The summarization inference container returns a body that isn't valid sumResponse JSON — e.g. a gateway HTML error page, an empty body from a crashed worker, a traceback from a Python error, or a schema mismatch in the summary response.","commonSituations":"The summarization inference container is overloaded, OOM-killed, or not fully started; wrong image version incompatible with Weaviate; a proxy returning HTML 502/504 pages; misconfigured SUM_INFERENCE_API pointing at a wrong service.","solutions":["Check the summarization inference container logs for tracebacks or crash messages","Curl the container's summarization endpoint directly to inspect the raw response body","Verify SUM_INFERENCE_API points to the correct host/port and the container is healthy","Upgrade the inference container image to a version compatible with your Weaviate release"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// verify the summarization container is reachable before querying\nresp, err := http.Get(sumInferrerURL + \"/meta\")\nif err != nil || resp.StatusCode >= 400 {\n\treturn fmt.Errorf(\"sum-transformers inference container not ready: %v\", err)\n}","typeGuard":"func isSummaryParseFailure(err error) bool {\n\treturn err != nil && strings.Contains(err.Error(), \"failed to parse summarization response\")\n}","tryCatchPattern":"out, err := summarizer.GetSummary(ctx, text)\nif err != nil {\n\tif strings.Contains(err.Error(), \"failed to parse summarization response\") {\n\t\t// inspect container logs / raw body, don't hot-retry a schema mismatch\n\t}\n\treturn fmt.Errorf(\"summarization failed: %w\", err)\n}","preventionTips":["Add readiness probes against the summarization container","Keep the sum-transformers inference image version in sync with Weaviate","Avoid proxies that replace JSON errors with HTML pages","Set resource limits so the container isn't OOM-killed under load"],"tags":["sum-transformers","json-parsing","inference-container","summarization"],"backgroundTag":"api-response-parse-failed","analyzedSha":"75aa4b6d11f8818305aafd4440b4e32794f7ca04","analyzedAt":"2026-09-04T14:58:20.392Z","contentChangedAt":"2026-09-04T14:58:20.392Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}