fix base handler default behavior (unmodified key), add error_handler option