adds unit test for grabcode handler
adds unit test for handler error