Fix wrong variable name

Use undefined variable 'error' instead of 'errorPointer'