Coder Social home page Coder Social logo

Comments (7)

pilaf avatar pilaf commented on June 15, 2024 1

@woller @leehericks Thanks for reporting back! I just released v0.4.1 with this fix.

from fmrest-ruby.

leehericks avatar leehericks commented on June 15, 2024

I am currently extending every model from this Record parent to resolve the issue within the models but simply using the scopes finished with .count isn't covered...

class FileMaker::Record < FmRest::Spyke::Base

  def self.find(id)
    query(fm_id: id).find_one
  rescue FmRest::APIError::ParameterError => error
    raise unless error.code == 401
    nil
  end

  def find_one(query)
    query.find_one
  rescue FmRest::APIError::ParameterError => error
    raise unless error.code == 401
    nil
  end

  def find_some(query)
    query.find_some
  rescue FmRest::APIError::ParameterError => error
    raise unless error.code == 401
    []
  end

  def count(query)
    query.count
  rescue FmRest::APIError::ParameterError => error
    raise unless error.code == 401
    0
  end
end

from fmrest-ruby.

pilaf avatar pilaf commented on June 15, 2024

@leehericks @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?

from fmrest-ruby.

leehericks avatar leehericks commented on June 15, 2024

I will do this as soon as I get back to work on Monday.

Foolish question but this would be changing my Gemfile to point to the github branch, right?

Thank you for your prompt work on this!

from fmrest-ruby.

pilaf avatar pilaf commented on June 15, 2024

@leehericks

this would be changing my Gemfile to point to the github branch, right?

Yeah, I think this should do the trick:

gem "fmrest", github: "beezwax/fmrest-ruby", branch: "fix-no-matching-records-error"

from fmrest-ruby.

woller avatar woller commented on June 15, 2024

@pilaf
It works! Thank you for fixing this.

from fmrest-ruby.

leehericks avatar leehericks commented on June 15, 2024

@pilaf
Works on all three situations, find_one => nil, find_some => [], count => 0

Thank you for fixing this! Looking forward to a gem version push.

from fmrest-ruby.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.