fix(desktop): log session.title RPC failure before REST fallback
The RPC-rename fallback swallowed all errors silently. Narrow it to log the swallowed error via console.warn so a genuine session.title RPC failure (which then surfaces a REST 404 for the runtime id) is diagnosable instead of invisible. Behavior is unchanged: REST fallback still runs for any session with a persisted row.
This commit is contained in:
@@ -59,9 +59,12 @@ export async function renameSessionPreferringRpc(
|
||||
})
|
||||
|
||||
return { title: result?.title ?? title }
|
||||
} catch {
|
||||
} catch (err) {
|
||||
// Fall through to REST — e.g. the socket is mid-reconnect. REST still
|
||||
// works for any session that already has a persisted row.
|
||||
// works for any session that already has a persisted row. Log so a
|
||||
// genuine RPC-side failure (which then surfaces a REST 404 for the
|
||||
// runtime id) is at least diagnosable instead of silently swallowed.
|
||||
console.warn('session.title RPC rename failed; falling back to REST', err)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user