api/vault: Fix 404 handling and improve error messages
Vault 404 error handling needed to be updated since changes related to exception handling server side.
Also improve returned error messages, add missing test and slightly refactor tests implementation (use hypothesis instead of harcoded data).
Closes T2388
Migrated from D3125 (view on Phabricator)