Looking for the feedback on suggested feature for rails credentials

Hi,

I’m looking for some suggestions like how to fix this issue mentioned here: https://github.com/rails/rails/issues/34107

So, currently in case of an error(like indentation etc.) in credentials.yml.enc file, it discards the changes and exits out

of the editor. This leads to a situation where users have to write newly added credentials again.

Upon discussing it with Wojciech, I found a good place to start looking but it would really help if people here could also

throw some suggestions. basically where the error should be handled and what is the desired behavior.