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

# getMessageFromUnknownError

```ts theme={null}
function getMessageFromUnknownError(error: unknown, defaultMesasge?: string): string;
```

Get a message from an unknown error with a fallback in case one is not found.

## Parameters

| Parameter         | Type      | Default value            | Description                                           |
| ----------------- | --------- | ------------------------ | ----------------------------------------------------- |
| `error`           | `unknown` | `undefined`              | The error to get a message from.                      |
| `defaultMesasge?` | `string`  | `"Something went wrong"` | The default message to return if no message is found. |

## Returns

`string`

The message from the error.
