apache/seatunnel · error

Find Slack Conversion Fail.

Error message

Find Slack Conversion Fail.

What it means

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.

Solutions

  1. Verify the Slack bot token (xoxb-...) is valid and not revoked using auth.test
  2. Add the channels:read (and groups:read for private channels) OAuth scope to the Slack app and reinstall it
  3. Check network connectivity / proxy settings so api.slack.com is reachable
  4. Retry after a backoff if Slack returned rate limit errors

Example fix

// before
String id = slackClient.findConversation(channelName);
// after
try {
    String id = slackClient.findConversation(channelName);
} catch (SlackConnectorException e) {
    // check token/scopes, then retry or fail fast with clear message
    throw new RuntimeException("Slack channel lookup failed: " + e.getMessage(), e);
}
Defensive patterns

Strategy: try-catch

Validate before calling

// Validate token before lookups
// curl -H "Authorization: Bearer $SLACK_TOKEN" https://slack.com/api/auth.test
if (slackToken == null || !slackToken.startsWith("xoxb-")) {
    throw new IllegalArgumentException("Slack bot token missing or malformed");
}

Try / catch

try {
    String id = slackClient.findConversation(channel);
} catch (SlackConnectorException e) {
    logger.error("Slack conversation lookup failed: {}", e.getMessage(), e);
    // fall back or abort with clear context
}

Prevention

When it happens

Trigger: 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).

Common situations: 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.

Related errors


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/7cbf6ed96530e3f8. Report an issue: GitHub.

Appendix: source

Thrown at seatunnel-connectors-v2/connector-slack/src/main/java/org/apache/seatunnel/connectors/seatunnel/slack/client/SlackClient.java:71

        List<Conversation> channels;
        try {
            // Get Conversion List
            ConversationsListResponse conversationsListResponse =
                    methodsClient.conversationsList(
                            r ->
                                    r
                                            // The Token used to initialize app
                                            .token(pluginConfig.get(OAUTH_TOKEN)));
            channels = conversationsListResponse.getChannels();
            for (Conversation channel : channels) {
                if (channel.getName().equals(pluginConfig.get(SLACK_CHANNEL))) {
                    conversionId = channel.getId();
                    // Break from for loop
                    break;
                }
            }
        } catch (IOException | SlackApiException e) {
            log.warn("Find Slack Conversion Fail.", e);
            throw new SlackConnectorException(
                    SlackConnectorErrorCode.FIND_SLACK_CONVERSATION_FAILED, e);
        }
        return conversionId;
    }

    /** Post a message to a channel using Channel ID and message text */
    public boolean publishMessage(String channelId, String text) {
        boolean publishMessageSuccess = false;
        try {
            ChatPostMessageResponse chatPostMessageResponse =
                    methodsClient.chatPostMessage(
                            createMessageRequest(pluginConfig.get(OAUTH_TOKEN), channelId, text));
            publishMessageSuccess = chatPostMessageResponse.isOk();
        } catch (IOException | SlackApiException e) {
            log.error("error: {}", ExceptionUtils.getMessage(e));
        }
        return publishMessageSuccess;

View on GitHub (pinned to cf67b549a7)