Failed to create record A/<domain> : list indices must be integers or slices, not str

This is the similar issue.

there should be some discussion about adding some debugging info to pinpoint the issue

Can you tell what do you mean?