Skip to content

UnhandledPromiseRejectionWarning: HttpError: Label does not exist on issues where not all labels are to be applied #32

@myakura

Description

@myakura

I'm trying out this action; it works but I get UnhandledPromiseRejectionWarning(s) while the action is running:

Adding labels bug to issue #11
Removing label test from issue #11
(node:1471) UnhandledPromiseRejectionWarning: HttpError: Label does not exist
at /home/runner/work/_actions/github/issue-labeler/v2.4.1/node_modules/@octokit/request/dist-node/index.js:76:23
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:1471) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:1471) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

It looks like it happens when not all labels are to be applied (i.e. most cases). Suppose I have the following label-matching definitions:

test:
  - '(test)'
bug:
  - '(bug)'

When an issue is filed with a body that contains both "test" and "bug", I don't see any warning. However, when the issue only contains either "test" or "bug", I see a warning. If the body contains neither, I see two warnings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions