added support for request handler success and error functions