Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork445
fix: returnAlreadyExists when archive exists#3050
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
fix: returnAlreadyExists when archive exists#3050
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Signed-off-by: dankeboy36 <dankeboy36@gmail.com>
codecovbot commentedNov 21, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@## master #3050 +/- ##==========================================- Coverage 69.41% 69.40% -0.02%========================================== Files 242 242 Lines 18632 18638 +6 ==========================================+ Hits 12934 12936 +2- Misses 4503 4506 +3- Partials 1195 1196 +1
Flags with carried forward coverage won't be shown.Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Please check if the PR fulfills these requirements
Seehow to contribute
before creating one)
our contributing guidelines
UPGRADING.mdhas been updated with a migration guide (for breaking changes)configuration.schema.jsonupdated if new parameters are added.What kind of change does this PR introduce?
Bug fix
What is the current behavior?
When a client archives a sketch via gRPC and the archiveTarget already exists, the CLI correctly errors, but with the incorrect status code. The status code is 3 (illegal argument) instead of 6 (already exists).
Currently, clients must parse the error message if they want to handle the archive -> fail -> archive with override flow. This might not work reliably with translations.
What is the new behavior?
The CLI errors with the correct already exists status code when archiving a sketch, and the archive target already exists.
Does this PR introduce a breaking change, and istitled accordingly?
Actually, this is a breaking change, but I do not know if any client is explicitly handling status code 3. The Arduino IDE 2.x just wipes the target if it exists:https://github.com/arduino/arduino-ide/blob/4d6cfad0ff603a106efd68ffe015d6fc7449f5fc/arduino-ide-extension/src/node/sketches-service-impl.ts#L637-L639
Other information