{"record":{"id":"af45d95b2188b419","repo":"chenhg5/cc-connect","slug":"slack-send-image-w","errorCode":null,"errorMessage":"slack: send image: %w","messagePattern":"slack: send image: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"platform/slack/slack.go","lineNumber":514,"sourceCode":"\trc, ok := rctx.(replyContext)\n\tif !ok {\n\t\treturn fmt.Errorf(\"slack: SendImage: invalid reply context type %T\", rctx)\n\t}\n\n\tname := img.FileName\n\tif name == \"\" {\n\t\tname = \"image.png\"\n\t}\n\n\t_, err := p.client.UploadFileV2Context(ctx, slack.UploadFileV2Parameters{\n\t\tReader:          bytes.NewReader(img.Data),\n\t\tFileSize:        len(img.Data),\n\t\tFilename:        name,\n\t\tChannel:         rc.channel,\n\t\tThreadTimestamp: rc.timestamp,\n\t})\n\tif err != nil {\n\t\treturn fmt.Errorf(\"slack: send image: %w\", err)\n\t}\n\treturn nil\n}\n\nvar _ core.ImageSender = (*Platform)(nil)\nvar _ core.ObserverTarget = (*Platform)(nil)\n\n// SendObservation implements core.ObserverTarget for terminal session observation.\nfunc (p *Platform) SendObservation(ctx context.Context, channelID, text string) error {\n\t_, _, err := p.client.PostMessageContext(ctx, channelID,\n\t\tslack.MsgOptionText(text, false),\n\t\tslack.MsgOptionDisableLinkUnfurl(),\n\t)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"slack: send observation: %w\", err)\n\t}\n\treturn nil\n}","sourceCodeStart":496,"sourceCodeEnd":532,"githubUrl":"https://github.com/chenhg5/cc-connect/blob/4000b2338aa6e850c99df54f8b0ed6ed7460b401/platform/slack/slack.go#L496-L532","documentation":"Wrapped error from slack-go UploadFileV2Context when uploading and posting an image to the reply channel/thread; the Slack file upload flow (upload/share) failed.","triggerScenarios":"Thrown at platform/slack/slack.go:514 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check Slack file size limits and bot channel membership","Retry transient errors"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4000b2338aa6e850c99df54f8b0ed6ed7460b401","analyzedAt":"2026-09-06T11:45:09.575Z","contentChangedAt":"2026-09-06T11:45:09.575Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}