Error handling when ami information is not found

Add unit test for web controller