refactor: cleanup default params in error handlers