{"record":{"id":"469788cd4f12454b","repo":"ytti/oxidized","slug":"slack-file-upload-failed","errorCode":null,"errorMessage":"Slack file upload failed","messagePattern":"Slack file upload failed","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"lib/oxidized/hook/slackdiff.rb","lineNumber":34,"sourceCode":"    upload_dest = client.files_getUploadURLExternal(filename:     \"change\",\n                                                    length:       content.length,\n                                                    snippet_type: \"diff\")\n    file_uri = URI.parse(upload_dest[:upload_url])\n\n    proxy_uri = URI.parse(proxy) if proxy\n    proxy_address = proxy_uri ? proxy_uri.host : :ENV\n    proxy_port = proxy_uri&.port\n    proxy_user = proxy_uri&.user\n    proxy_pass = proxy_uri&.password\n\n    http = Net::HTTP.new(file_uri.host, file_uri.port, proxy_address, proxy_port, proxy_user, proxy_pass)\n    http.use_ssl = true\n\n    request = Net::HTTP::Post.new(file_uri.request_uri, { Host: file_uri.host })\n    request.body = content\n    response = http.request(request)\n\n    raise 'Slack file upload failed' unless response.is_a? Net::HTTPSuccess\n\n    files = [{\n      id:    upload_dest[:file_id],\n      title: title\n    }]\n    begin\n      client.files_completeUploadExternal(channel_id: channel,\n                                          files:      files.to_json)\n    rescue Slack::Web::Api::Errors::NotInChannel\n      logger.info \"Not in specified channel, attempting to join\"\n      client.conversations_join(channel: channel)\n      client.files_completeUploadExternal(channel_id: channel,\n                                          files:      files.to_json)\n    end\n  end\n\n  def run_hook(ctx)\n    return unless ctx.node","sourceCodeStart":16,"sourceCodeEnd":52,"githubUrl":"https://github.com/ytti/oxidized/blob/687ed4262d9d21e54662e872e2383386d8498f7b/lib/oxidized/hook/slackdiff.rb#L16-L52","documentation":"Error \"Slack file upload failed\" thrown in ytti/oxidized.","triggerScenarios":"Thrown at lib/oxidized/hook/slackdiff.rb:34 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":"687ed4262d9d21e54662e872e2383386d8498f7b","analyzedAt":"2026-08-23T11:19:42.084Z","schemaVersion":2},"datasetVersion":"2026-08-23T16:17:53.355Z"}