apigee-127 / swagger-node-runner

The heart of Swagger-Node
MIT License
102 stars 123 forks source link

Revert "middleware chain is broken when found ctx.output" Fix #80. #81

Closed chrisegner closed 7 years ago

chrisegner commented 7 years ago

This reverts commit ac6dad9fb5071bddd7a95c32cc38e9cc15c57228.

The original commit causes a server-side error when express's default 404 handler gets invoked after the response is set. The default 404 handler attempts to set the status code header, which can't be done since those bits have already been sent.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 96.19% when pulling be9547bd25602e7dad47443316ff2ee6a1b5043b on chrisegner:master into 6f61ed80c5a6e4db0de329e61a80b5448b316dff on theganyo:master.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 96.19% when pulling be9547bd25602e7dad47443316ff2ee6a1b5043b on chrisegner:master into 6f61ed80c5a6e4db0de329e61a80b5448b316dff on theganyo:master.

theganyo commented 7 years ago

Thanks. Sorry for the regression. We clearly need a test case on this.

osher commented 7 years ago

That's not a regression, there is some other force at work but we are yet to find it ... Please watch #82

theganyo commented 7 years ago

Superceded by https://github.com/theganyo/swagger-node-runner/pull/74.