Skip to content

AsyncApp nosie on handling unauthorized events #1534

Description

@aviadpriel

On the AsyncApp we are using authorize function for validate the bot tokens

When we do not find the token, the api must return 200

But the typing of authorize
is
Optional[Callable[..., Awaitable[AuthorizeResult]]] = None,
instead of Optional[Callable[..., Awaitable[AuthorizeResult | None]]] = None,

I override the type to be like what the SDK allows, but we still get error log on each api call
This makes a noise and prevents us from focusing on actual errors

The source of the log is on AsyncMultiTeamsAuthorization
Image

Reproducible in:

Call the Bolt app with an unauthorized event

The slack_bolt version

latest version

Python runtime version

3.11.0

OS info

any os

Steps to reproduce:

  1. Set up AsyncApp with authorize that can return None
  2. call with an unauthorized event
  3. See the log

Expected result:

a. remove the log / convert to info
b. param to ignore the log
c. any workaround that allows us to suppress the log

Actual result:

Image

Requirements

Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions