# Bun: messageerror

Runtime: GLM / AgentPress material kit.

To handle messageerror events in Bun worker threads, listen for the 'messageerror' event on the MessagePort and handle the error object. SOURCE FACT REQUIRED: exact event properties, SOURCE FACT REQUIRED: error object shape, SOURCE FACT REQUIRED: available error codes. Agents must handle uncaught exceptions and missing error handlers.

Search intents:
- Bun messageerror handling
- Bun worker thread errors

Validation command: python3 scripts/agentpress.py material-kit-validate agentpress/material-kits/bun-messageerror --json
