---
title: RejectExpression type | Wartiva GraphQL API
description: RejectExpression represents an nftables expression for rejecting a packet. Wartiva GraphQL API reference with arguments, fields, and examples.
url: https://wartiva.com/api-docs/types/reject-expression.html
updated: 2026-10-07
---

Endpoint configuration · GraphQL type

# `RejectExpression` type

RejectExpression represents an nftables expression for rejecting a packet. Instead of simply dropping a packet silently, 'reject' sends an error message back to the sender, such as an ICMP error or a TCP RST.

## Fields

| Field Name | Description |
|---|---|
| `type` - [`RejectType!`](https://wartiva.com/api-docs/types/reject-type.html) | The type of rejection message to send (e.g., ICMP, TCP_RST). |
| `code` - [`RejectCode!`](https://wartiva.com/api-docs/types/reject-code.html) | The specific error code to include in the rejection message. |

## Used by

- [`ChainExpression`](https://wartiva.com/api-docs/types/chain-expression.html) union: A union of all possible nftables chain expression types.

## Example

### Example

```json
{"type": "ICMP", "code": "ROUTE_UNREACHABLE"}

```

---

Wartiva is in early access. Request access: https://wartiva.com/early-access.html  
All pages: https://wartiva.com/llms.txt
