Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add throttler to gql sample to illustrate bug reading 'header' of undefined #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sadams
Copy link
Owner

@sadams sadams commented Mar 31, 2023

Reproduce:

  1. run npm install
  2. run npm start in sample/23-graphql-code-first
  3. visit http://localhost:3000/graphql
  4. execute query {recipes{title}}
  5. see output:
[Nest] 95109  - 31/03/2023, 09:21:31   ERROR [ExceptionsHandler] Cannot read properties of undefined (reading 'header')
TypeError: Cannot read properties of undefined (reading 'header')
    at GqlThrottlerGuard.handleRequest (/[...]/sample/23-graphql-code-first/node_modules/@nestjs/throttler/src/throttler.guard.ts:88:9)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
asdf
[Nest] 95109  - 31/03/2023, 09:21:32   ERROR [ExceptionsHandler] Cannot read properties of undefined (reading 'header')
TypeError: Cannot read properties of undefined (reading 'header')
    at GqlThrottlerGuard.handleRequest (/[...]/sample/23-graphql-code-first/node_modules/@nestjs/throttler/src/throttler.guard.ts:88:9)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants