Added tests for Vault endpoint and refactored how errors are handled
from responses