Newbie question: why are ‘error’ and error both used as arguments in this javascript code?

Just a bit of code logging an error. Why is error a string for the first argument?

request.on(‘error’, error=> console.log(error.code))

Always sort of confusing when reserved words are strings.