{"record":{"id":"bca8371ab6f6fc99","repo":"henrygd/beszel","slug":"no-logs-in-response","errorCode":null,"errorMessage":"no logs in response","messagePattern":"no logs in response","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/hub/transport/transport.go","lineNumber":76,"sourceCode":"\t\t*d = *resp.SystemData\n\t\treturn nil\n\tcase common.CheckFingerprint:\n\t\td, ok := dest.(*common.FingerprintResponse)\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"unexpected dest type for CheckFingerprint: %T\", dest)\n\t\t}\n\t\tif resp.Fingerprint == nil {\n\t\t\treturn errors.New(\"no fingerprint in response\")\n\t\t}\n\t\t*d = *resp.Fingerprint\n\t\treturn nil\n\tcase common.GetContainerLogs:\n\t\td, ok := dest.(*string)\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"unexpected dest type for GetContainerLogs: %T\", dest)\n\t\t}\n\t\tif resp.String == nil {\n\t\t\treturn errors.New(\"no logs in response\")\n\t\t}\n\t\t*d = *resp.String\n\t\treturn nil\n\tcase common.GetContainerInfo:\n\t\td, ok := dest.(*string)\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"unexpected dest type for GetContainerInfo: %T\", dest)\n\t\t}\n\t\tif resp.String == nil {\n\t\t\treturn errors.New(\"no info in response\")\n\t\t}\n\t\t*d = *resp.String\n\t\treturn nil\n\tcase common.GetSmartData:\n\t\tswitch d := dest.(type) {\n\t\tcase *map[string]smart.SmartData:\n\t\t\tif resp.SmartData == nil {\n\t\t\t\treturn errors.New(\"no SMART data in response\")","sourceCodeStart":58,"sourceCodeEnd":94,"githubUrl":"https://github.com/henrygd/beszel/blob/b38fb7dafa60812cc22e6a84ce313e94f1ce0a32/internal/hub/transport/transport.go#L58-L94","documentation":"unmarshalLegacyResponse returns this when a GetContainerLogs response has resp.String == nil, meaning the legacy agent sent no logs payload. The container-logs request technically succeeded but the payload is absent.","triggerScenarios":"UnmarshalResponse on a GetContainerLogs request where the legacy AgentResponse has an empty String field.","commonSituations":"Container no longer exists or stopped before logs were gathered (agent had nothing to send); agent version not supporting container logs; mismatch between hub request and agent capabilities.","solutions":["Verify the container exists and is running on the host","Update the agent to a version supporting GetContainerLogs","Check agent logs for an underlying container-runtime error","Retry the request"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// only request logs for containers known to be running on the host\nif !containerRunning(host, containerName) {\n    return nil\n}","typeGuard":null,"tryCatchPattern":"if err := UnmarshalResponse(resp, common.GetContainerLogs, dest); err != nil {\n    if strings.Contains(err.Error(), \"no logs\") {\n        return nil // treat as empty logs\n    }\n    return err\n}","preventionTips":["Request logs only for running containers","Ensure the agent supports container monitoring (Docker/Podman socket mounted)","Treat empty log payloads as empty output, not fatal"],"tags":["go","docker","container-logs","legacy-agent"],"backgroundTag":"missing-payload-in-response","analyzedSha":"b38fb7dafa60812cc22e6a84ce313e94f1ce0a32","analyzedAt":"2026-08-31T15:10:10.149Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}