I agree with that. I used what we use in other services (ie. builds) and
quite frankly I haven't thought about API part here. I will see what is the
best thing to do here and handle it in the API properly.


On Sat, Dec 28, 2013 at 6:42 AM, Henrik Hodne <notifications@github.com>wrote:

> In lib/travis/services/find_requests.rb:
>
> > +      def run
> > +        result
> > +      end
> > +
> > +      private
> > +
> > +        def result
> > +          if repo
> > +            requests = repo.requests
> > +            if params[:older_than]
> > +              requests.older_than(params[:older_than])
> > +            else
> > +              requests.recent
> > +            end
> > +          else
> > +            scope(:request).none
>
> I think that if the repository is not found, the API should return a 404,
> so we should probably return something other than an empty result here. I
> think maybe nil or some exception (although I dislike both, I think maybe
> they are the best way in Ruby).
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/travis-ci/travis-core/pull/316/files#r8575493>
> .
>



-- 
Piotr Sarnacki
http://piotrsarnacki.com