Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove a label from an issue: Clarify 404 status code #35553

Closed
1 task done
david-allison opened this issue Dec 4, 2024 · 10 comments
Closed
1 task done

Remove a label from an issue: Clarify 404 status code #35553

david-allison opened this issue Dec 4, 2024 · 10 comments
Labels
content This issue or pull request belongs to the Docs Content team fix-internally Triggers a workflow to copy the issue internally and close the current issue rest Content related to rest - overview. SME reviewed An SME has reviewed this issue/PR

Comments

@david-allison
Copy link

david-allison commented Dec 4, 2024

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/rest/issues/labels?apiVersion=2022-11-28#remove-a-label-from-an-issue

What part(s) of the article would you like to see updated?

It is unclear whether a 404 is generated because:

  1. The label does not exist on the Pull Request/Issue
    • Expected error most people will want to handle
  2. The label is not defined on the repo
    • Catastrophic logic error

Additional information

Relevant docs

This endpoint returns a 404 Not Found status if the label does not exist.


404 Resource not found
@david-allison david-allison added the content This issue or pull request belongs to the Docs Content team label Dec 4, 2024
Copy link

welcome bot commented Dec 4, 2024

Thanks for opening this issue. A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.

@github-actions github-actions bot added the triage Do not begin working on this issue until triaged by the team label Dec 4, 2024
@nguyenalex836 nguyenalex836 added waiting for review Issue/PR is waiting for a writer's review rest Content related to rest - overview. and removed triage Do not begin working on this issue until triaged by the team labels Dec 5, 2024
@nguyenalex836
Copy link
Contributor

@david-allison Thank you for raising this issue! I'll get this triaged for review ✨ Our team will provide feedback regarding the best next steps for this issue - thanks for your patience! 💛

@subatoi subatoi added the needs SME This proposal needs review from a subject matter expert label Dec 6, 2024
Copy link
Contributor

github-actions bot commented Dec 6, 2024

Thanks for opening an issue! We've triaged this issue for technical review by a subject matter expert 👀

@Waedalsrori

This comment has been minimized.

@nguyenalex836 nguyenalex836 added SME reviewed An SME has reviewed this issue/PR and removed waiting for review Issue/PR is waiting for a writer's review needs SME This proposal needs review from a subject matter expert labels Jan 8, 2025
@nguyenalex836
Copy link
Contributor

@david-allison Thank you so much for your patience while our SME team reviewed! 💛 After reviewing, our SME team provided the following response:

We return a 404 error if the specified repository or issue does not exist, or if the issue does not have the requested label attached. This behavior is what you would expect from an API when removing labels from an issue. If a user wants to check whether a label exists on a repository, they can try fetching that specific label using the following endpoint. If this request returns a 404 error, it means that the label does not exist in the repository.

We hope this clarifies the 404 status - please let us know if you have any questions ✨

@david-allison
Copy link
Author

@nguyenalex836 The aim of this issue was to get the documentation improved, so future readers don't need to do the (quick) investigation which I needed to do.

Is the documentation likely to be fixed, or will this be treated as a support ticket?

@nguyenalex836
Copy link
Contributor

@david-allison Apologies! I should have asked in my previous response - given the information our SMEs provided, what suggestions do you have for updating the documentation? Would you be willing to submit a PR for those updates? 💛

@david-allison
Copy link
Author

No. I posted this issue so a SME would submit a PR

@nguyenalex836 nguyenalex836 added the fix-internally Triggers a workflow to copy the issue internally and close the current issue label Jan 14, 2025
@nguyenalex836
Copy link
Contributor

Thanks @david-allison! We've filed an issue to have this fixed internally 💛

@docs-bot
Copy link
Collaborator

Thank you for opening this issue! Updates to this documentation must be made internally. I have copied your issue to an internal issue, so I will close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content This issue or pull request belongs to the Docs Content team fix-internally Triggers a workflow to copy the issue internally and close the current issue rest Content related to rest - overview. SME reviewed An SME has reviewed this issue/PR
Projects
None yet
Development

No branches or pull requests

5 participants