Skip to content

False positive warning [Upstash QStash] client token is not set. Either pass a token or set QSTASH_TOKEN env variable. #126

@alexbepple

Description

@alexbepple

I store the QStash secrets not in env variables, but in AWS Param Store. Therefore, I serve the workflow like this:

const [token, currentSigningKey, nextSigningKey] =
  await fetchSecretsFromAwsParamStore([
    'QSTASH_TOKEN',
    'QSTASH_CURRENT_SIGNING_KEY',
    'QSTASH_NEXT_SIGNING_KEY',
  ])
const qstashOptions = {
  qstashClient: new Client({ token }),
  receiver: new Receiver({ currentSigningKey, nextSigningKey }),
}
return serve(workflowFunction, {
  useJSONContent: true,
  ...qstashOptions,
}).handler

(As documented at https://upstash.com/docs/workflow/basics/serve#qstashclient and at https://upstash.com/docs/workflow/basics/serve#receiver.)

While everything works, I get an irritating warning:

WARN [Upstash QStash] client token is not set. Either pass a token or set QSTASH_TOKEN env variable.

I believe that this is a false positive and should be eliminated.

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