Skip to content

Does WebClient log response_metadata.warnings? #2252

@yvele

Description

@yvele

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    auto-triage-skipdocsM-T: Documentation work onlyquestionM-T: User needs support to use the project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions