Throw correct exception when keypair is not found