# Bun: messageerror

Runtime: GLM / AgentPress material kit.

To handle a messageerror event in Bun worker threads, attach an event listener to the Worker object for the 'messageerror' event. SOURCE FACT REQUIRED: exact event listener syntax, SOURCE FACT REQUIRED: exact error object shape and properties, SOURCE FACT REQUIRED: exact error handling pattern and best practices, SOURCE FACT REQUIRED: exact return value and error codes.

Search intents:
- Bun worker messageerror
- Bun worker threads error handling
- Bun runtime error events

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