{"record":{"id":"0784984c482fabcc","repo":"zed-industries/zed","slug":"slack-api-error-data-error","errorCode":null,"errorMessage":"Slack API error: {data['error']}","messagePattern":"Slack API error: (.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"script/github-assign-contributor-issue.py","lineNumber":313,"sourceCode":"        },\n    )\n    print(f\"Set project status to '{status_name}'\")\n\n\n# --- Slack ---\n\n\ndef slack_post_message(headers, recipient, text):\n    \"\"\"Post a message to a Slack channel or user DM.\"\"\"\n    response = requests.post(\n        f\"{SLACK_API}/chat.postMessage\",\n        headers=headers,\n        json={\"channel\": recipient, \"text\": text},\n    )\n    response.raise_for_status()\n    data = response.json()\n    if not data[\"ok\"]:\n        raise RuntimeError(f\"Slack API error: {data['error']}\")\n\n\ndef find_slack_user_id(headers, email):\n    \"\"\"Look up a Slack user ID by email. Returns None if not found.\"\"\"\n    try:\n        response = requests.get(\n            f\"{SLACK_API}/users.lookupByEmail\",\n            headers=headers,\n            params={\"email\": email},\n        )\n        response.raise_for_status()\n        return response.json()[\"user\"][\"id\"]\n    except (requests.RequestException, KeyError):\n        return None\n\n\ndef post_to_activity(slack_headers, message):\n    \"\"\"Best-effort post to the Slack activity channel.\"\"\"","sourceCodeStart":295,"sourceCodeEnd":331,"githubUrl":"https://github.com/zed-industries/zed/blob/bc538def4545534201bbfcac4e95ac34ea6501b6/script/github-assign-contributor-issue.py#L295-L331","documentation":"Error \"Slack API error: {data['error']}\" thrown in zed-industries/zed.","triggerScenarios":"Thrown at script/github-assign-contributor-issue.py:313 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":"bc538def4545534201bbfcac4e95ac34ea6501b6","analyzedAt":"2026-08-16T07:30:46.435Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}