{"record":{"id":"7cbf6ed96530e3f8","repo":"apache/seatunnel","slug":"find-slack-conversion-fail","errorCode":null,"errorMessage":"Find Slack Conversion Fail.","messagePattern":"Find Slack Conversion Fail\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-slack/src/main/java/org/apache/seatunnel/connectors/seatunnel/slack/client/SlackClient.java","lineNumber":71,"sourceCode":"        List<Conversation> channels;\n        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;","sourceCodeStart":53,"sourceCodeEnd":89,"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#L53-L89","documentation":"SlackClient.findConversation logs this warning and throws SlackConnectorException (FIND_SLACK_CONVERSATION_FAILED) when the Slack conversations.list lookup fails with an IOException or SlackApiException while trying to resolve a channel name to a channel ID. The exception wraps the underlying Slack SDK error so the connector can surface a typed failure to the sink.","triggerScenarios":"Calling SlackClient.findConversation when the Slack API HTTP call fails (network error, invalid token, rate limiting) or Slack returns an API error (invalid_auth, channel_not_found semantics handled as exception, missing channels:read scope).","commonSituations":"Bot token revoked or expired; Slack app missing channels:read / groups:read scopes; corporate proxy blocking api.slack.com; hitting Slack rate limits (429); typo in configured channel lookup flow.","solutions":["Verify the Slack bot token (xoxb-...) is valid and not revoked using auth.test","Add the channels:read (and groups:read for private channels) OAuth scope to the Slack app and reinstall it","Check network connectivity / proxy settings so api.slack.com is reachable","Retry after a backoff if Slack returned rate limit errors"],"exampleFix":"// before\nString id = slackClient.findConversation(channelName);\n// after\ntry {\n    String id = slackClient.findConversation(channelName);\n} catch (SlackConnectorException e) {\n    // check token/scopes, then retry or fail fast with clear message\n    throw new RuntimeException(\"Slack channel lookup failed: \" + e.getMessage(), e);\n}","handlingStrategy":"try-catch","validationCode":"// Validate token before lookups\n// curl -H \"Authorization: Bearer $SLACK_TOKEN\" https://slack.com/api/auth.test\nif (slackToken == null || !slackToken.startsWith(\"xoxb-\")) {\n    throw new IllegalArgumentException(\"Slack bot token missing or malformed\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    String id = slackClient.findConversation(channel);\n} catch (SlackConnectorException e) {\n    logger.error(\"Slack conversation lookup failed: {}\", e.getMessage(), e);\n    // fall back or abort with clear context\n}","preventionTips":["Validate the bot token with auth.test at startup","Grant channels:read (and groups:read) scopes before deploying","Configure sensible timeouts and retry on 429 rate limits","Confirm proxy/firewall allows api.slack.com"],"tags":["slack","network","api-error"],"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"}