vapor-community / PackageCatalogAPI

A replacement for the IBM Swift Package Catalog.
6 stars 0 forks source link

Internal server error if search would return no results #3

Open twof opened 6 years ago

twof commented 6 years ago

example: https://package.vapor.cloud/packages/search?name=asdfasdfsdfasdf&limit=10 returns

{
    "reason": "Something went wrong.",
    "error": true
}
twof commented 6 years ago

Issue is here. I think it ought to return an empty array instead if there are no results

https://github.com/vapor-community/PackageCatalogAPI/blob/master/Sources/App/Models/GitHub.swift#L63

Edit: Actually that shouldn't be causing the issue we're seeing since that wouldn't throw a 500