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

Successful export yields "Unexpected Return Status" error message #1594

Closed
rocodes opened this issue Nov 21, 2022 · 1 comment · Fixed by #1596
Closed

Successful export yields "Unexpected Return Status" error message #1594

rocodes opened this issue Nov 21, 2022 · 1 comment · Fixed by #1596
Assignees

Comments

@rocodes
Copy link
Contributor

rocodes commented Nov 21, 2022

Description

A successful export in the client yields an error message in the export dialog. This is a recent change.

Steps to Reproduce

Run the client from a point after these changes were merged, then attempt an export. Observe logs on sd-devices.

Expected Behavior

Successful export, no errors in sd-devices logs, and confirmation message in client export dialog.

Actual Behavior

Successful export, no errors in sd-devices logs, followed by "UNEXPECTED_RETURN_STATUS" error message in export dialog:

export

Comments

Because a successful export currently/historically returns no status value, the changes linked above mean that the client attempts to initialize an ExportStatus enum from the empty string, yielding a ValueError.

Currently/historically, print, disk and printer-test all return without a status when they are successful (documentation) This will change with the rewrite to sd-export so that behaviour is consistent, but for now, backwards compatibility is required.

@gonzalo-bulnes
Copy link
Contributor

gonzalo-bulnes commented Nov 21, 2022

Is 0a7f7e0#diff-3b161d8b931cce1065e57c179e7ab43bdf312ced640b3051449216295179fbf6R158 the line at fault? I think I missed that an empty string could be an expected value. 😕

Edit to add: 💡 There is no "success" value in the definition of ExportStatus! I definitely misread the code that sometimes returns an empty string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants