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

[clipboard] readText() returns 400 when empty #1646

Open
gschier opened this issue Aug 10, 2024 · 1 comment
Open

[clipboard] readText() returns 400 when empty #1646

gschier opened this issue Aug 10, 2024 · 1 comment
Labels
plugin: clipboard-manager question Further information is requested status: upstream This issue needs to be fixed in an upstream project

Comments

@gschier
Copy link

gschier commented Aug 10, 2024

I know this was intentional, because there's an error message, but should readText() return nothing when the clipboard is empty instead of throwing a 400? Or, perhaps there could be an alternative way to check the clipboard status that doesn't error.

I have an app that checks for something in the clipboard on window focus, and these console errors are difficult to see around.

CleanShot 2024-08-10 at 07 13 06@2x

@gschier gschier changed the title Clipboard Manager readText 400 when empty [clipboard] readText() returns 400 when empty Aug 10, 2024
@FabianLars FabianLars added question Further information is requested plugin: clipboard-manager labels Sep 3, 2024
@FabianLars
Copy link
Member

I don't really disagree with you but the crates we use throw the same error for emtpy data and wrong formats (i know i'm stating the obvious since that's what the error says). At first glance it looks like the OS apis don't make differentiating easy (not impossible though i think).

Since the invalid format part of the error may be important we can't do anything here for now. Marking this as an upstream issue.

@FabianLars FabianLars added the status: upstream This issue needs to be fixed in an upstream project label Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin: clipboard-manager question Further information is requested status: upstream This issue needs to be fixed in an upstream project
Projects
None yet
Development

No branches or pull requests

2 participants