Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.map(({ mediaType, apiElements, location }) => {
try {
return compile(mediaType, apiElements, location);
} catch (error) {
throw prefixError(
error,
'Unable to compile HTTP transactions from ' +
`API description document '${location}': ${error.message}`,
);
}
})
.map((compileResult, i) =>
({ location, content }, next) => {
const decoratedNext = prefixErrors(
next,
`Unable to parse API description document '${location}'`,
);
parse(content, decoratedNext);
},
(error, parseResults) => {