Comments (3)
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.
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.
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)
- Memory leaks in a127-magic HOT 2
- Mock mode auto response does not set Content-Type to application/json, so validation fails HOT 1
- 200/OK code is returned when an error is thrown. HOT 4
- Empty arrays cause errors
- Environment configs HOT 6
- problem with latest version of swagger-tools/json-refs HOT 6
- npm dependency (graceful-fs) needs updating
- File upload broke from v0.11.0 to v0.11.1 HOT 7
- js-yaml introduces changes in behaviour HOT 5
- Security Handlers? HOT 1
- does not work on Apigee edge any more due to const keyword in a downstream dependency
- Need to fix a127-magic moderate vulnerabilities.
- Breaking change in 0.7.0
- Stack trace is shown as validation fails for request parameters HOT 2
- add support for swaggerValidatorMiddleware's new 'options' param HOT 1
- add the swagger-ui middleware as an option HOT 5
- support array of controller paths in config files (default.yaml) HOT 10
- update to swagger-tools 0.8.0 dependency :) HOT 1
- Add the capability to access config from controllers
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from magic.