> ## Documentation Index
> Fetch the complete documentation index at: https://botmesh.afaya.com.co/llms.txt
> Use this file to discover all available pages before exploring further.

# InvalidProviderEventError

> Class exported by @botmesh/core.

Defined in: [core/errors.ts:33](https://github.com/andresayac/botmesh/blob/main/packages/core/src/core/errors.ts#L33)

A provider emitted an event that does not follow the normalized event contract
(`IProvider.onEvent`): not an object, an unknown `kind`, or a message/interaction without
the ids the core routes by. The event is dropped and this error goes to the bot `'error'`
event. `reason` names the broken field; no ids or message contents are included.

## Extends

* `Error`

## Constructors

### Constructor

```ts theme={null}
new InvalidProviderEventError(providerId, reason): InvalidProviderEventError;
```

Defined in: [core/errors.ts:39](https://github.com/andresayac/botmesh/blob/main/packages/core/src/core/errors.ts#L39)

#### Parameters

| Parameter | Type |
| - | - |
| `providerId` | `string` |
| `reason` | `string` |

#### Returns

`InvalidProviderEventError`

#### Overrides

`Error.constructor`

## Properties

### code

```ts theme={null}
readonly code: "INVALID_PROVIDER_EVENT" = 'INVALID_PROVIDER_EVENT';
```

Defined in: [core/errors.ts:34](https://github.com/andresayac/botmesh/blob/main/packages/core/src/core/errors.ts#L34)

***

### providerId

```ts theme={null}
readonly providerId: string;
```

Defined in: [core/errors.ts:36](https://github.com/andresayac/botmesh/blob/main/packages/core/src/core/errors.ts#L36)

The provider that emitted the event.

***

### reason

```ts theme={null}
readonly reason: string;
```

Defined in: [core/errors.ts:38](https://github.com/andresayac/botmesh/blob/main/packages/core/src/core/errors.ts#L38)

What is wrong with the event (e.g. `'message.chatId must be a non-empty string'`).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.