beezwax/fmrest-ruby

Asking an empty FmRest::Spyke::Relation if it's empty, throws a FmRest::APIError::ParameterError

Closed this issue · 4 comments

The same error is thrown, when trying to get the first record in an empty relation. Would it be possible to return an empty array, when trying to do either of these operations? Then you would get the desired output (true and nil).

pilaf commented

@woller By "asking if it's empty" do you mean calling .empty?.

@pilaf Yeah, that's what I meant.

pilaf commented

@woller

I just pushed a fix for this to the fix-no-matching-records-error branch (changes here: dc0a629).

Would you mind sourcing the gem from that branch and checking if it solves the issue?

pilaf commented

@woller Actually would you mind responding on #34 ?

That issue and this one appear to be the same.