Record credit failures

Another step of #2508. Fixes #1811. Built on top of #2579.
In the mean time, we should implement the workaround, which is to perform an additional API request to load the relevant resource and confirm the change.