Connecting expected errors to call back function

With this change, all we need to do in django is to make the call back function handle the ev_type "close". If the ev_type is "close", there is always a "status" field in the items, which indicates success or fail. In case of a fail, there is a "msg" field that needs to be displayed to user.