started working on error handling - WIP

Signed-off-by: Siddhartha Gupta <makerzzz.zzzz@gmail.com>