Task Error Reporting
Overview
When a Tower task transitions to the error state, the error is automatically reported to neo-backend (POST /v2/client-errors) so the team can investigate without needing SSH access to the server.
How it works
- When
taskError()is called inTaskService, a fire-and-forget POST is sent to neo-backend. - The error's nested
causechain is flattened into a[{ name, message, stack, code }]array. - The payload includes context: app version (read from
package.jsonat service init), task type, source type, and file name. - The call never blocks the task lifecycle — errors in the reporting itself are silently swallowed.
Key files
src/utils/errors.ts—flattenError()functionsrc/protocol/bcyip/api.ts—reportError()+ClientErrorPayloadinterfacesrc/core/task/task.service.ts— Fire-and-forget call intaskError()
Technical decisions
- Fire-and-forget (
.catch(() => {})) to ensure task lifecycle is never affected by reporting failures. appVersionis read once at service init frompackage.jsonto avoid repeated disk reads.