Bug 977931 - return an error object even when restResponse.headers is null. r=spenrose