[Bug]: not sure when a 404 should show up

Open
#16,624 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
django, python
Domain
backend

Research direction

The 404-versus-'We couldn't find that add-on' behaviour is reported on the developer hub edit and versions pages, so start with the views that serve /developers/addon/<slug>/edit and /versions and the lookup that raises when the slug is missing or not owned by the user. Reproduce with a nonexistent slug and with an add-on owned by another user, then confirm which of the two should return a 404. Done when both scenarios return the agreed status code in the relevant tests.

Written by the indexing model from the issue text.

Description

component:pinguino_devhub needs:info
Is there an existing issue for this?
  • I have searched the existing issues
What happened?

From https://github.com/mozilla/addons/issues/16528#issuecomment-7036080527

Scenarios:

As a developer I am accessing a url - the slug does not exist
https://addons-dev.allizom.org/en-US/developers/addon/a-webextension-in-nov/edit
https://addons-dev.allizom.org/en-US/developers/addon/a-webextension-in-nov/versions

I see "We couldn't find that add-on." ❓Legacy dev hub throws a 404.
not a 404

As an admin I try to access versions or edit page to an addon that does not belong to me

https://github.com/mozilla/addons/issues/16549#issuecomment-7098146916

What did you expect to happen?

If these should throw a 404

┆Issue is synchronized with this Jira Task

Dominant language
Makefile
Stars
135
Forks
52
Avg merge
6d 18h
Merged PRs (30d)
7

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mozilla/addons

All issues in mozilla/addons

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.