Skip to content

kraken: raise ExtensionNotFound when restarting uninstalled extension - #4185

Open
Safe-bet wants to merge 1 commit into
bluerobotics:masterfrom
Safe-bet:fix/kraken-restart-unknown-extension-404
Open

kraken: raise ExtensionNotFound when restarting uninstalled extension#4185
Safe-bet wants to merge 1 commit into
bluerobotics:masterfrom
Safe-bet:fix/kraken-restart-unknown-extension-404

Conversation

@Safe-bet

Copy link
Copy Markdown

Description

Fixes #4160

POST /kraken/v2.0/extension/{identifier}/restart for an extension identifier that was never installed previously returned HTTP 400 (Extension {identifier} have no running versions) instead of HTTP 404 (Extension {identifier} not found).

This PR updates Extension.from_running(identifier) to raise ExtensionNotFound (HTTP 404) when the installed list is empty, while preserving ExtensionNotRunning (HTTP 400) when the extension is installed but disabled.

@patrickelectric

Copy link
Copy Markdown
Member

Hi @Safe-bet, thanks for the work, the team will review it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: Restarting an unknown extension returns HTTP 400 (not running) instead of 404 (not found)

2 participants