Fixes the headers passing to the request options and adding the url key to the error object passed by the request error listener.