Implemented mg_set_http_error_handler()