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.

Need to document how to handle errors

See original GitHub issue

It throws some error but you don’t know how to handle them…

such as this:

  • Missing Content-Type
  • Unsupported content type
  • Multipart: Boundary not found

I have this code but it never fire this event

busboy.on('error', function (err) {
    console.error('Error while parsing the form: ', err);
    // some code
})

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:2
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
markstoscommented, Aug 26, 2015

I’d like docs on error handling recommendations for as well. For example. When parsing a field ab exception might be thrown, but calling res.send() there won’t stop the control flow, as handlers will continue to fire for other fields that get parsed, resulting in accidentally sending headers multiple times.

0reactions
tiblucommented, Apr 18, 2018

For others struggling to understand how Busboy errors should be handled, take a look at Multers-s code or use Multer instead - https://github.com/expressjs/multer/blob/master/lib/make-middleware.js#L45

Read more comments on GitHub >

github_iconTop Results From Across the Web

Handling Errors, Help & Documentation
Handling Errors,. Help & Documentation. John Stasko. Spring 2007. This material has been developed by Georgia Tech HCI faculty, and continues to evolve....
Read more >
API Documentation - Error handling - Rev
Error Handling. Operations that result in an error due to a problem on the client's part (eg invalid input) will standard 4xx codes....
Read more >
Handling errors in a process - BMC Documentation
Open the process in which you want to add the Error Boundary event. Log in to BMC Helix Innovation Studio and navigate to...
Read more >
Handle errors | Stripe Documentation
Stripe offers many kinds of errors. They can reflect external events, like declined payments and network interruptions, or code problems, like invalid API ......
Read more >
Introduction to Error Handling - Make
By adding an error handler route to a module, you can replace the default error handling logic with your own. Make offers 5...
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