adding armory error handling