Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Merge pull request #103 from mulesoft/features/Add-flag-to-disable-er…
Browse files Browse the repository at this point in the history
…ror-interception

Add flag to disable error interception
  • Loading branch information
Damian Martinez Gelabert committed May 24, 2016
2 parents b1a1f1d + 0d98152 commit d6ba320
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion osprey.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,15 @@ exports.loadFile = function (path, opts) {
middleware.push(security(raml, options.security))
}

middleware.push(handler, error)
middleware.push(handler)

if (!options.disableErrorInterception) {
middleware.push(error)
}

var result = compose(middleware)
result.ramlUriParameters = handler.ramlUriParameters
return result
})
}

0 comments on commit d6ba320

Please sign in to comment.