Calling store credential on already stored credential will abandon and send problem report
When calling the store credential endpoint on an issue credential v1 record that is already in state credential_acked, ACA-Py will set the state to abandoned and set a problem report (same behaviour as described in https://github.com/hyperledger/aries-cloudagent-python/issues/1730)
While indeed you shouldn't call store credential on an already completed credential, setting the state to abandoned and sending a problem report seems like an overreaction.
I could make a quick fix for just this method, but I suspect this will be present in more places throughout the codebase so opening an issue to create awareness.
Opinions of others on fixing such issues and how -- @andrewwhitehead @shaangill025 @ianco @dbluhm?
The "fix everything" implication is the need to look at every protocol, every state, every admin call, decide if the action is "safe" and if so, make whatever change is needed to not trigger an error. Obviously, that's the extreme, and a lot of work. Further, such changes could just hide bugs in controllers, where inappropriate calls are being made and no one is noticing.
On the other hand, fixing one-offs might be a good idea. Deal with them as individual issues and PRs? But that goes back to, does this really help controller developers?
The "fix everything" implication is the need to look at every protocol, every state, every admin call, decide if the action is "safe" and if so, make whatever change is needed to not trigger an error
I think this is necessary. I also think it's just a matter of deciding - if there is an error - whether to send a problem report or not. I suspect the error handling is all correct (or at least mostly correct) we're just too aggressive in sending problem reports when we get an error condition.
@TimoGlastra -- Could you do a PR for this specific instance of this issue as a way to get the ball rolling on getting more of this handling in place? As noted, I suspect these changes are going to have to be done on a protocol-by-protocol, state-by-state basis vs. some sort of "across the board" change. From your example, we can then debate how to get this done more broadly in ACA-Py.