Does `WebClient` log `response_metadata.warnings`?

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

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

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

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.

Description

auto-triage-skip docs question

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

Dominant language
TypeScript
Stars
3.4k
Forks
693
Avg merge
1d 1h
Merged PRs (30d)
67

Getting set up

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.

More from slackapi/node-slack-sdk

All issues in slackapi/node-slack-sdk

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.