{"record":{"id":"0d3296323bcb4303","repo":"hasura/graphql-engine","slug":"reading-response-from-schema-dump-api-w","errorCode":null,"errorMessage":"reading response from schema dump api: %w","messagePattern":"reading response from schema dump api: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/migrate/database/hasuradb/schema_dump.go","lineNumber":49,"sourceCode":"\t\tquery := hasura.PGDumpRequest{\n\t\t\tOpts:        opts,\n\t\t\tCleanOutput: true,\n\t\t\tSourceName:  sourceName,\n\t\t}\n\n\t\tresp, err := h.pgDumpClient.Send(query)\n\t\tif err != nil {\n\t\t\th.logger.Debug(err)\n\n\t\t\treturn nil, errors.E(op, err)\n\t\t}\n\n\t\tbs, err := io.ReadAll(resp)\n\t\tif err != nil {\n\t\t\treturn nil, errors.E(\n\t\t\t\top,\n\t\t\t\terrors.KindHasuraAPI,\n\t\t\t\tfmt.Errorf(\"reading response from schema dump api: %w\", err),\n\t\t\t)\n\t\t}\n\n\t\treturn bs, nil\n\t}\n\n\treturn nil, errors.E(\n\t\top,\n\t\tfmt.Errorf(\"schema dump for source %s of kind %v is not supported\", sourceName, sourceKind),\n\t)\n}\n","sourceCodeStart":31,"sourceCodeEnd":61,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/cli/migrate/database/hasuradb/schema_dump.go#L31-L61","documentation":"ExportSchemaDump failed while reading the HTTP response body from the Hasura schema dump API (dump_metadata / run_sql dump endpoint). The read error is wrapped and tagged KindHasuraAPI.","triggerScenarios":"Calling ExportSchemaDump when the HTTP response body read is interrupted: connection reset, server closing the stream early, proxy timeouts, or truncated chunked responses.","commonSituations":"Large schemas timing out behind a reverse proxy or load balancer, flaky network between CLI and Hasura, server restarting mid-response.","solutions":["Retry the export; transient network failures are the most common cause","Increase proxy/read timeouts for large schema dumps","Verify network connectivity and Hasura server health","For very large schemas, dump directly from the database instead of via the API"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// health check before dumping\nresp, err := http.Get(endpoint + \"/healthz\")\nif err != nil || resp.StatusCode != 200 { return fmt.Errorf(\"server unhealthy\") }","typeGuard":null,"tryCatchPattern":"var buf []byte\nfor attempt := 0; attempt < 3; attempt++ {\n    buf, err = hdb.ExportSchemaDump(...)\n    if err == nil { break }\n    time.Sleep(time.Duration(attempt+1) * time.Second)\n}","preventionTips":["Increase proxy timeouts for large schema dumps","Retry transient response-read failures"],"tags":["hasura","network","schema-dump","api"],"backgroundTag":"http-response-read-failed","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}