Adding two new error codes.

no call back handler, and invalid type request.

Also fixed two event handler bugs