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

Fix doc and changelog API response for orphaned addons #5082

Merged
merged 2 commits into from
May 21, 2024

Conversation

mdegat01
Copy link
Contributor

Proposed change

Follow-up to #5064 . It appears orphaned addons return 400 responses to /changelog that the frontend cannot interpret. While digging I noticed that the /documentation API has the same problem, it just hasn't come up yet (probably because update entities do not hit it in the background like they do with the changelog).

Changed both these APIs so they go back to returning 200 responses with the error as text. As noted in the other PR, we should really handle this differently. Although in this case I'm not sure a 404 makes sense since this is a bit odd. Still it would be nice to have the API correctly report an error and the frontend show the appropriate text rather then having supervisor return error text to display to users.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (which adds functionality to the supervisor)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Ruff (ruff format supervisor tests)
  • Tests have been added to verify that the new code works.

If API endpoints of add-on configuration are added/changed:

@mdegat01 mdegat01 added the bugfix A bug fix label May 16, 2024
@mdegat01 mdegat01 requested a review from agners May 16, 2024 01:59
@agners agners merged commit c0c0c4b into main May 21, 2024
19 checks passed
@agners agners deleted the orphaned-addon-changelog-response branch May 21, 2024 07:02
@github-actions github-actions bot locked and limited conversation to collaborators May 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Could not fetch changelog errors not fixed in 2024.05.1
2 participants