Fix unknown properties returning None instead of raising AttributeError#492
Fix unknown properties returning None instead of raising AttributeError#492gourabsingha1 wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates Adyen/services/base.py to raise an AttributeError when an unknown attribute is accessed, and adds corresponding unit tests in test/ClientTest.py. The reviewer suggests resolving parent attributes outside of the assertRaises block in the test to prevent false positives if intermediate attributes are missing.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|



This PR fixes a bug (Issue #397) where accessing non-existent attributes on any subclass of AdyenBase (e.g. adyen.foobar) incorrectly returned None instead of raising an AttributeError, which led to confusing runtime errors such as TypeError: 'NoneType' object is not callable.