tauri-apps / tauri-apps/plugins-workspace

[clipboard] readText() returns 400 when empty

Open
#1,646 1 comment 0 reactions 0 assignees View on GitHub
plugin: clipboard-manager status: upstream type: question
Dominant language
Rust
Stars
1.8k
Forks
602
Avg merge
4d 14h
Merged PRs (30d)
9

Description

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](https://github.com/user-attachments/assets/5d31af4e-386d-410e-bcba-0e4d14d2ea60)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.