refactor(server): simplify router middleware with next() (#21720)

This commit is contained in:
Dax
2026-04-11 16:55:17 -04:00
committed by GitHub
parent 57c40eb7c2
commit ca5f086759
32 changed files with 767 additions and 467 deletions

View File

@@ -137,12 +137,18 @@ export const TuiThreadCommand = cmd({
),
})
worker.onerror = (e) => {
Log.Default.error(e)
Log.Default.error("thread error", {
message: e.message,
filename: e.filename,
lineno: e.lineno,
colno: e.colno,
error: e.error,
})
}
const client = Rpc.client<typeof rpc>(worker)
const error = (e: unknown) => {
Log.Default.error(e)
Log.Default.error("process error", { error: errorMessage(e) })
}
const reload = () => {
client.call("reload", undefined).catch((err) => {