question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Production throw unhandledRejection warning

See original GitHub issue

In production(run after build with webpack) throw unhandledRejection

The error output:

{ 
  remainingPoints: 0,
  msBeforeNext: 900000,
  consumedPoints: 5,
  isFirstInDuration: false 
}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
animircommented, May 13, 2020

@suhaotian consume rejects, when there is not enough points to consume, see this section in docs. You can use penalty method instead. However, it can be also rejected on Redis error. You can use penalty method with insuranceLimiter or add try/catch block. Hope, this helps.

1reaction
animircommented, May 12, 2020

@suhaotian Hi, most likely, there is uncaught Promise rejection. what is limiter related code in your project?

Read more comments on GitHub >

github_iconTop Results From Across the Web

how to properly throw an error if promise is rejected ...
The unhandled rejection warning, no - you should not write code that doesn't handle errors. It would have been better to write p.then(console....
Read more >
Unhandled rejection warnings when expecting a rejection #173
It has a promise chain whose catch block throws an exception. I assumed this gets translated into a rejected promise, especially since the...
Read more >
Handling unhandled promise rejections in async functions
But this code will always produce a warning about an unhandled rejection: const delay = require('delay');const main = async () => {
Read more >
Node.js 15 release: Updated handling of rejections, npm 7, N ...
In previous versions of Node.js, if there was an unhandled rejection, you would get a warning about the rejection and a deprecation warning....
Read more >
Node.js 15 Is Out! What Does It Mean for You? - Maxim Orlov
This error originated either by throwing inside of an async function ... You can set up alerts in production and track down unhandled...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found