recurly/recurly-client-python

New webhook attribute addition breaking Python webhook parsing

Closed this issue · 6 comments

Yesterday the following part was added to your new_dunning_event_notification webhook:

<subscription_ids type="array">
  <subscription_id>
    <subscription_id>abcdefg</subscription_id>
  </subscription_id>
</subscription_ids>

We are using version 2.3.1 of your library and it fails to parse the webhook now with the following exception:

File "/usr/local/lib/python2.7/dist-packages/recurly/__init__.py", line 1046, in objects_for_push_notification
  res = Resource.value_for_element(child_el)
File "/usr/local/lib/python2.7/dist-packages/recurly/resource.py", line 404, in value_for_element
  return [cls._subclass_for_nodename(sub_elem.tag).from_element(sub_elem) for sub_elem in elem]
File "/usr/local/lib/python2.7/dist-packages/recurly/resource.py", line 364, in _subclass_for_nodename
    % nodename)
ValueError: Could not determine resource class for array member with tag 'subscription_id'
bhelx commented

@niekbaeten This was supposed to be a non-breaking change but it appears to be breaking the python library. We've identified the problem and have a fix coming server side. I'll keep this open until we can confirm it's working. Sorry for the trouble.

jinto commented

I got the same error. +1 vote.

bhelx commented

@niekbaeten @jinto The server-side change should have fixed. Can you confirm you are no longer seeing this error?

jinto commented

Thank you @bhelx !

I found no top level 'subscription_ids' element in newly generated new_dunning_events. And objects_for_push_notification() succeeded.
How about failed notifications on https://odk.recurly.com/integrations/notifications?show=failed ?
They must stay there? I've clicked retry button but it's failed again cause it's data not changed.
I want see 'zero failed' on webhook page, is it possible? :)

Yeah I can see working new_dunning_event_notification now.
Thanks for the fix.

bhelx commented

Please re-open if anyone is still having this problem.