# pub.chive.activity.markFailed

> Published by [chive.pub](https://lexicon.garden/identity/did:plc:7natp5xae72bddaqlkef2t4e)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.activity.markFailed)
- [Documentation](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.activity.markFailed/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.activity.markFailed/examples)

## Definitions

### `pub.chive.activity.markFailed`

**Type**: `procedure`

Mark a pending activity as failed when PDS write fails

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `rkey` | `string` | Yes | Record key (TID) |
| `errorCode` | `string` | Yes | Error code identifying the failure type |
| `collection` | `string` | Yes | NSID of the record collection |
| `errorMessage` | `string` | Yes | Human-readable error message |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `success` | `boolean` | Yes | Whether the activity was successfully marked as failed |

#### Errors

- **AuthenticationRequired**
- **NotFound**

## Raw Schema

```json
{
  "id": "pub.chive.activity.markFailed",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "schema": {
          "type": "object",
          "required": [
            "collection",
            "rkey",
            "errorCode",
            "errorMessage"
          ],
          "properties": {
            "rkey": {
              "type": "string",
              "description": "Record key (TID)"
            },
            "errorCode": {
              "type": "string",
              "maxLength": 50,
              "description": "Error code identifying the failure type"
            },
            "collection": {
              "type": "string",
              "description": "NSID of the record collection"
            },
            "errorMessage": {
              "type": "string",
              "maxLength": 1000,
              "description": "Human-readable error message"
            }
          }
        },
        "encoding": "application/json"
      },
      "errors": [
        {
          "name": "AuthenticationRequired"
        },
        {
          "name": "NotFound"
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "success"
          ],
          "properties": {
            "success": {
              "type": "boolean",
              "description": "Whether the activity was successfully marked as failed"
            }
          }
        },
        "encoding": "application/json"
      },
      "description": "Mark a pending activity as failed when PDS write fails"
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1,
  "revision": 1
}
```
