Giter Club home page Giter Club logo

Comments (3)

whitlockjc avatar whitlockjc commented on August 23, 2024

swagger-tools' initializeMiddleware was not ever intended to be an "error-first callback" and is not documented to be. There is no safe way to handle an error so passing it back to the caller makes no sense. The code in swagger-tools is doing the right thing. This issue is caused by the version of json-refs in swagger-tools being broken so upgrading to a version that fixes it should fix this issue.

I've now had to reply with a similar response to three separate issues filed in three separate projects. Fixing this in [email protected] means magic will get the fix automatically and itself does not require any changes to fix this. I will let @theganyo decide whether or not to close this as it's already being addressed in swagger-tools.

from magic.

confuser avatar confuser commented on August 23, 2024

Then can someone explain how I'm supposed to figure out why my Node.js application is crashing when these modules simply hide the error message which would immediately give me an answer on your platform?

To reproduce from the very README on this project:

var a127 = require('a127-magic');
var app = require('express')();

a127.init(function(config) {
  throw new Error('You should see this, but you do not');
  app.use(a127.middleware(config));
  app.listen(process.env.PORT || 10010);
});

Process exits, no error, nothing. How is this a feature?

from magic.

whitlockjc avatar whitlockjc commented on August 23, 2024

I think I've figured it out. I'm closing this and we'll discuss at swagger-tools as this is a swagger-tools issue.

from magic.

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.