{"record":{"id":"83854014819f4433","repo":"apache/seatunnel","slug":"find-slack-conversation-failed","errorCode":"FIND_SLACK_CONVERSATION_FAILED","errorMessage":"Find Slack Conversion Fail.","messagePattern":"Find Slack Conversion Fail\\.","errorType":"error_code","errorClass":"SlackConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-slack/src/main/java/org/apache/seatunnel/connectors/seatunnel/slack/client/SlackClient.java","lineNumber":72,"sourceCode":"        try {\n            // Get Conversion List\n            ConversationsListResponse conversationsListResponse =\n                    methodsClient.conversationsList(\n                            r ->\n                                    r\n                                            // The Token used to initialize app\n                                            .token(pluginConfig.get(OAUTH_TOKEN)));\n            channels = conversationsListResponse.getChannels();\n            for (Conversation channel : channels) {\n                if (channel.getName().equals(pluginConfig.get(SLACK_CHANNEL))) {\n                    conversionId = channel.getId();\n                    // Break from for loop\n                    break;\n                }\n            }\n        } catch (IOException | SlackApiException e) {\n            log.warn(\"Find Slack Conversion Fail.\", e);\n            throw new SlackConnectorException(\n                    SlackConnectorErrorCode.FIND_SLACK_CONVERSATION_FAILED, e);\n        }\n        return conversionId;\n    }\n\n    /** Post a message to a channel using Channel ID and message text */\n    public boolean publishMessage(String channelId, String text) {\n        boolean publishMessageSuccess = false;\n        try {\n            ChatPostMessageResponse chatPostMessageResponse =\n                    methodsClient.chatPostMessage(\n                            createMessageRequest(pluginConfig.get(OAUTH_TOKEN), channelId, text));\n            publishMessageSuccess = chatPostMessageResponse.isOk();\n        } catch (IOException | SlackApiException e) {\n            log.error(\"error: {}\", ExceptionUtils.getMessage(e));\n        }\n        return publishMessageSuccess;\n    }","sourceCodeStart":54,"sourceCodeEnd":90,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-slack/src/main/java/org/apache/seatunnel/connectors/seatunnel/slack/client/SlackClient.java#L54-L90","documentation":"SlackClient.findConversation resolves a channel name to a conversation ID via Slack's conversations.list API. If listing channels throws IOException or SlackApiException, the client logs a warning and throws SlackConnectorException with code FIND_SLACK_CONVERSATION_FAILED. This means the channel could not be resolved — not necessarily that it doesn't exist.","triggerScenarios":"findConversation(channelName) is called and the Slack Web API call fails: network error (IOException) or Slack API error response (SlackApiException) such as invalid auth token, missing scope (channels:read), or rate limiting while paging through conversations.","commonSituations":"Invalid or expired Slack bot token; bot not invited to a private channel so the channel never appears in listings; missing OAuth scopes; Slack rate limits (429) during repeated lookups; network/firewall blocking api.slack.com.","solutions":["Verify the Slack token is valid and has the required scopes (channels:read, groups:read for private channels).","Check the logged warning for the SlackApiException error code to see the exact API error (e.g. invalid_auth, ratelimited).","Use the channel ID directly instead of a channel name to skip lookup entirely.","Invite the bot to the target channel (/invite @bot) if it is private, so it appears in listings.","If rate-limited, add retry/backoff or reduce lookup frequency."],"exampleFix":"// before: lookup by name can fail\nconversationId = slackClient.findConversation(\"#my-channel\");\n// after: use the stable channel ID\nconversationId = \"C0123456789\"; // from Slack channel details","handlingStrategy":"try-catch","validationCode":"// before lookup: check token/scopes via auth.test\ncallSlackApi(\"auth.test\", Map.of()); // fails fast on invalid token","typeGuard":null,"tryCatchPattern":"try {\n    String id = slackClient.findConversation(name);\n} catch (SlackConnectorException e) {\n    if (e.getCause() instanceof SlackApiException sae && \"ratelimited\".equals(sae.getError())) {\n        // back off and retry\n    } else {\n        throw e;\n    }\n}","preventionTips":["Cache channel name→ID resolution instead of looking up per record.","Use channel IDs directly to avoid the lookup path entirely.","Grant the bot channels:read/groups:read scopes and invite it to private channels.","Add retry with backoff for rate-limited lookups."],"tags":["slack","channel-lookup","api"],"backgroundTag":"api-error-response","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}