removed unused variable, renamed error data.

This `data` is from the parent scope, yes?