# ImqServerPlugin.error() method · @imqueue/datadog

Source: https://imqueue.org/api/datadog/latest/datadog.imqserverplugin.error/
Published: 2026-08-01
Author: @imqueue maintainers (https://github.com/imqueue)
Package: @imqueue/datadog 3.2.0 — generated reference, not hand-written

Marks the span as failed. The span itself is finished by `finish()`, which the instrumentation always publishes.

**Signature:**

```typescript
error(ctx: ImqCallContext): void;
```

## Parameters


| Parameter | Type | Description |
| --- | --- | --- |
| ctx | [ImqCallContext](https://imqueue.org/api/datadog/latest/datadog.imqcallcontext/) | call that failed; carries the error in `ctx.error` |


**Returns:**

void

