Skip to content

Commit

Permalink
fix(registry): no packages in registry
Browse files Browse the repository at this point in the history
  • Loading branch information
mkucharz committed Mar 16, 2018
1 parent 54968b7 commit 50ef86f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/registry/syncano/registry/src/get.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ export default function run (ctx) {
return response.json(responseObj)
})
.catch(err => {
debug('Error:', err.message)
if (err.message === 'No results for given query.') {
return response({message: 'No such socket!'}, 404)
debug('Error:', [err.message])
if (err.message.match(/No results for given query/)) {
return response.json({message: 'No such socket!'}, 404)
} else if (err.message) {
response.json({message: err.message}, 400)
return response.json({message: err.message}, 400)
}
})
}
Expand Down

0 comments on commit 50ef86f

Please sign in to comment.