fix test
add test for exception case
change api model and view a bit