Giter Site home page Giter Site logo

Comments (7)

JonAbrams avatar JonAbrams commented on August 30, 2024

Excellent suggestion! It could even handle the error differently depending on if it's running in production mode or not.

from synth.

mikaelhm avatar mikaelhm commented on August 30, 2024

👍 Yes, that was my point :)

from synth.

sylg avatar sylg commented on August 30, 2024

👍

from synth.

JonAbrams avatar JonAbrams commented on August 30, 2024

I love that by using promises, we can now safely throw errors right in the request handler! 😃

from synth.

mikaelhm avatar mikaelhm commented on August 30, 2024

Yes, it's really nice! 👍

from synth.

JonAbrams avatar JonAbrams commented on August 30, 2024

Thanks! I don't think I'm quite done with it yet. At some point I'd like to add some more flexibility, like register a subscriber for errors, so you can hook in services like Airbrake. Also, some errors probably don't need to be suppressed in production. Maybe add a {… public: true } attribute to tell the error handler that it's ok to share the response with the client?

from synth.

mikaelhm avatar mikaelhm commented on August 30, 2024

Sounds good, I would love to use Opbeat. But that shouldn't be too hard with opbeat-node.

Regarding the "public" errors, I think thats a brilliant idea! That would make it very simple to do proper error messaging "right at the spot".

from synth.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.