Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API objects return nil when dereferenced with non-existing method #1272

Open
jasonbuehler opened this issue Feb 6, 2024 · 1 comment
Open

Comments

@jasonbuehler
Copy link

Issue summary

When I call a method on a ShopifyAPI api object that doesn't exist it returns nil instead of raising NoMethodError

  • shopify_api version: 13.4
  • Ruby version:
  • Operating system:

Expected behavior

An exception should be raised NoMethodError

Actual behavior

The method call returns nil

Steps to reproduce the problem

  1. Instantiate a ShopifyAPI ruby object (I used an api product)
  2. Dereference with a non-existent method
@matteodepalo
Copy link
Contributor

Hi @jasonbuehler, thank you for opening this issue which I'm linking to the other one you've opened as they are related #1273

It seems like the method_missing implementation could be improved to raise NoMethodError in case the instance variable is not defined. I'll take a not of this and add this issue to our backlog together with the other one you've opened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants