addons-code-manager
addons-code-manager copied to clipboard
Infinite 404 errors in Compare view when comparing two versions from a filepath that's not available in either versions
Describe the problem and steps to reproduce it:
- Open the following compare page: https://code.addons.allizom.org/en-US/compare/1002949/versions/2478166...2478215/?path=js%2Fbackground_script.js
- Notice the errors in the page and in the browser console
What happened?
Infinite 404 errors are displayed in the compare page and in the console. This happens because the background_script.js is not available in either of the compared versions.
What did you expect to happen?
The error should only be triggered once and, ideally, explain what caused it.
Anything else we should know?
In a real life scenario, this can happen when a reviewer compares the latest add-on version - which includes a new file - with the previous version and then decides to inspect earlier versions, while still having the new file loaded in the URL.
┆Issue is synchronized with this Jira Task
Looks like it was a known issue: https://github.com/mozilla/addons-code-manager/pull/1025#pullrequestreview-293392483, and I am not sure what to do about it either right now.