class · Browser and Node

# Refusal

A handler returns this to refuse a request. It becomes a signed trust-task-error.

`@toip-tools/trust-core` · [View source](https://github.com/yourbuddyconner/toip-tools/blob/main/packages/trust-core/src/tasks.ts#L22)

Import:

```ts
import { Refusal } from "@toip-tools/trust-core";
```

## Constructor

Constructor:

```ts
new (code: string, message: string): Refusal;
```

### Parameters

- **`code` (required)**: `string`
- **`message` (required)**: `string`

### Returns

`Refusal`

## Properties

- **`code` (required · readonly)**: `string`
- **`message` (required · readonly)**: `string`

[Usage guide](https://toip.tools/toolkit/trust-core/#usage) · [Error handling](https://toip.tools/toolkit/trust-core/#errors) · [All exports](https://toip.tools/toolkit/trust-core/api/)

---

This is the Markdown version of https://toip.tools/toolkit/trust-core/api/Refusal/. An index of the documentation for AI assistants is at https://toip.tools/llms.txt.
