When on-wiki JavaScript fails JSMin's (JSParser to be exact) validation, it makes the minified script file just throw an error. This error thrown includes the page name (e.g. User:Example/common.js).
This output is cached, which means if someone copies the JavaScript (e.g. to debug the problem), it will show the wrong filename/page name for that subsequent user.
This usually won't be too hard for a user to figure out (particularly if there's only one copy). However, the page name could be added to the cache key to fix this. I don't think this will have too much of a performance impact. There generally shouldn't be many identical copies of a script (there are certainly scripts widely imported, though).
Version: 1.22.0
Severity: enhancement