Skip to content

Commit

Permalink
Modified Request: Data streams + JSON do not play well together
Browse files Browse the repository at this point in the history
  • Loading branch information
gratcliff committed Jul 4, 2019
1 parent 2c03217 commit 24cbb97
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/swagger.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ exports.run = async function({ args, opts }) {
}

function error(err) {
console.log(err)
try {
return Promise.reject(new Error(JSON.parse(err.error).description));
} catch (e) {
Expand All @@ -59,7 +58,7 @@ exports.run = async function({ args, opts }) {
spec: fs.createReadStream(path.resolve(process.cwd(), specPath)),
},
headers: {
version: versionCleaned
version: versionCleaned,
},
auth: { user: key },
resolveWithFullResponse: true,
Expand Down

0 comments on commit 24cbb97

Please sign in to comment.