{"record":{"id":"1d91636ecb63b564","repo":"sipeed/picoclaw","slug":"failed-to-create-table-w","errorCode":null,"errorMessage":"failed to create table: %w","messagePattern":"failed to create table: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/channels/teams_webhook/teams_webhook.go","lineNumber":366,"sourceCode":"\t\t\t\tType:  adaptivecard.TypeTableCell,\n\t\t\t\tItems: []*adaptivecard.Element{&textBlock},\n\t\t\t}\n\t\t\ttableCells = append(tableCells, cell)\n\t\t}\n\t\tallRows = append(allRows, tableCells)\n\t}\n\n\tif len(allRows) == 0 {\n\t\treturn adaptivecard.Element{}, fmt.Errorf(\"no valid rows found in table\")\n\t}\n\n\t// Create table with first row as headers\n\tfirstRowAsHeaders := true\n\tshowGridLines := true\n\n\ttable, err := adaptivecard.NewTableFromTableCells(allRows, 0, firstRowAsHeaders, showGridLines)\n\tif err != nil {\n\t\treturn adaptivecard.Element{}, fmt.Errorf(\"failed to create table: %w\", err)\n\t}\n\n\t// Set column widths based on header content length\n\ttable.Columns = calculateColumnWidths(headerLengths)\n\n\treturn table, nil\n}\n\n// calculateColumnWidths creates TableColumnDefinition entries with widths\n// proportional to the max content length of each column.\nfunc calculateColumnWidths(maxLengths []int) []adaptivecard.Column {\n\tif len(maxLengths) == 0 {\n\t\treturn nil\n\t}\n\n\t// Use content length as relative weight, with a minimum of 1\n\tcolumns := make([]adaptivecard.Column, len(maxLengths))\n\tfor i, length := range maxLengths {","sourceCodeStart":348,"sourceCodeEnd":384,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/pkg/channels/teams_webhook/teams_webhook.go#L348-L384","documentation":"Error \"failed to create table: %w\" thrown in sipeed/picoclaw.","triggerScenarios":"Thrown at pkg/channels/teams_webhook/teams_webhook.go:366 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"49183d7e8daed0dba89ddbb6fcb60089401d9680","analyzedAt":"2026-08-15T21:55:41.315Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}