slackapi / slackapi/node-slack-sdk

Does `WebClient` log `response_metadata.warnings`?

Open
#2,252 4 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

auto-triage-skip docs question
Dominant language
TypeScript
Stars
3.4k
Forks
688
Avg merge
15h 31m
Merged PRs (30d)
27

Description

The WebClient constructor takes logging parameters as described in the documentation:

export interface WebClientOptions {
  logger?: Logger;
  logLevel?: LogLevel;
}

When calling a WebClient request, the method returns a WebAPICallResult

export interface WebAPICallResult {
  ok: boolean;
  error?: string;
  response_metadata?: {
    warnings?: string[];
    next_cursor?: string;
    scopes?: string[];
    acceptedScopes?: string[];
    retryAfter?: number;
    messages?: string[];
  };
}

My question is: Should I log myself response_metadata.warnings or does WebClient automatically log result warnings?

Can this answer be specified in the documentation (and JSDoc) please?

https://tools.slack.dev/node-slack-sdk/web-api#logging

Somehow related to:

Packages:

Select all that apply:

  • @slack/web-api
Reproducible in:
The Slack SDK version
"@slack/web-api": "~7.9.2"
Node.js runtime version

Node.js v22.12.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the WebClient logging documentation linked in the issue and the WebClientOptions and WebAPICallResult declarations shown there. Determine whether response_metadata.warnings are logged automatically, then document that behavior in the logging guide and relevant JSDoc. Done means the documentation clearly tells callers whether they must log warnings themselves.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
api, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.