packages/exception/docs/api/serializer/functions/convertToSerializable.md
[**@httpx/exception**](../../README.md) • **Docs**
---
[@httpx/exception](../../README.md) / [serializer](../README.md) / convertToSerializable
# Function: convertToSerializable()
> **convertToSerializable**(`e`, `params`?): `Serializable`
Convert an Error, NativeError or any HttpException to
an object suitable for serialization (a serializable version).
## Parameters
• **e**: [`HttpException`](../../base/classes/HttpException.md) \| [`NativeError`](../type-aliases/NativeError.md)
• **params?**: `SerializerParams`
## Returns
`Serializable`
## Link