diff --git a/plugin/index.ts b/plugin/index.ts index b7d2082..0245c08 100644 --- a/plugin/index.ts +++ b/plugin/index.ts @@ -230,8 +230,10 @@ export default { logger.info(`Agent dispatched for slot ${slotId}: ${result?.status || 'ok'}`); return true; - } catch (err) { - logger.error('Failed to dispatch agent for slot:', err); + } catch (err: any) { + const msg = err?.message || err?.code || String(err); + const stack = err?.stack?.split('\n').slice(0, 3).join(' | ') || ''; + logger.error(`Failed to dispatch agent for slot: ${msg} ${stack}`); return false; } }