Skip to content

Commit

Permalink
Merge pull request #1530 from SynBioHub/zane-dev-plugins
Browse files Browse the repository at this point in the history
Minor error handling
  • Loading branch information
cjmyers authored Oct 10, 2023
2 parents da7cf1f + 24fd545 commit 43b97f2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/plugins/pluginEndpoints.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ module.exports = function (req, res) {
}).then(response => {
return res.status(200).send(response.data)
}).catch(error => {
return res.status(error.status).send('The plugin ' + name + ' status endpoint is not responding. Check that the plugin is active and running. ' + error)
return res.status(500).send('The plugin ' + name + ' status endpoint is not responding. Check that the plugin is active and running. ' + error)
})
}

Expand Down Expand Up @@ -87,7 +87,7 @@ module.exports = function (req, res) {
}
return res.status(200).send(response.data)
}).catch(error => {
return res.status(error.status).send('The plugin ' + name + ' evaluate endpoint is not responding. Check that the plugin is active and running. ' + error)
return res.status(500).send('The plugin ' + name + ' evaluate endpoint is not responding. Check that the plugin is active and running. ' + error)
})
}

Expand Down Expand Up @@ -137,7 +137,7 @@ module.exports = function (req, res) {
return res.status(200).send(response.data)
}).catch(error => {
res.header('Content-Type', 'text/plain')
return res.status(error.status).send(error)
return res.status(500).send(error)
})
}

Expand Down

0 comments on commit 43b97f2

Please sign in to comment.