deposit: Rework exception handling
It currently was written in the "avoid raising exception" way for some reason. So it instead returns dict of errors when any.
It's less clear than actually raising specific deposit exceptions. That's apparent now that we added types.
So this is to rework exception handling with dedicated ones so the code and types are clearer.
Note that some duplication also occurred in the exception generation. That's also the occasion to clean those up.
Technically, this is well covered by tests. So with no changes to the tests, that should stay green when that refactoring is done. That could also be the opportunity to add some logging in exception cases.
Migrated from T2792 (view on Phabricator)