documentation

we need an error object passed as the first argument to the error method