Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Commit

Permalink
docs: add ecosystem - httpx/exception
Browse files Browse the repository at this point in the history
  • Loading branch information
belgattitude committed Oct 28, 2023
1 parent 7db3458 commit 37986a3
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,26 @@ const tson = createTson({
});
```

## [@httpx/exception](https://github.com/belgattitude/httpx/tree/main/packages/exception#httpxexception)

```typescript
import { createTson } from "tupleson";
import { type HttpException } from "@httpx/exception";
import { fromJson, toJson, type SerializerError } from "@httpx/exception/serializer";

const httpException: TsonType<HttpException | SerializerError, string> = {
key: "HttpException",
deserialize: (v) => fromJson(v),
serialize: (v) => toJson(v),
test: (v) => v instanceof HttpException,
};

const tson = createTson({
types: [httpException],
});

```

---

<!-- ## All contributors ✨
Expand Down

0 comments on commit 37986a3

Please sign in to comment.