mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-06-08 12:13:31 -04:00
fix(Clipboard): stale image entry handling
- Resolved random DMS API errors & QML Warnings
This commit is contained in:
@@ -2,6 +2,7 @@ package clipboard
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"net"
|
||||
|
||||
@@ -73,6 +74,10 @@ func handleGetEntry(conn net.Conn, req models.Request, m *Manager) {
|
||||
|
||||
entry, err := m.GetEntry(uint64(id))
|
||||
if err != nil {
|
||||
if errors.Is(err, errEntryNotFound) {
|
||||
models.Respond[any](conn, req.ID, nil)
|
||||
return
|
||||
}
|
||||
models.RespondError(conn, req.ID, err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user