Fixed discovery api loader test to handle error.