Skip to content

Commit 8e4283e

Browse files
Update content/microservices/custom-transport.md
1 parent f943957 commit 8e4283e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/microservices/custom-transport.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ connect
216216
event to dispatch: { pattern: 'event', data: 'Hello world!' }
217217
```
218218

219-
#### Message Serialization
219+
#### Message serialization
220220

221221
If you need to add some custom logic around the serialization of responses on the client side, you can use a custom class that extends the `ClientProxy` class or one of its child classes. For modifying successful requests you can override the `serializeResponse` method, and for modifying any errors that go through this client you can override the `serializeError` method. To make use of this custom class, you can pass the class itself to the `ClientsModule.register()` method using the `customClass` property. Below is an example of a custom `ClientProxy` that serializes each error into an `RpcException`.
222222

0 commit comments

Comments
 (0)