Skip to content

Commit

Permalink
docs: fix broken links (#2878)
Browse files Browse the repository at this point in the history
* docs(ecosystem): fix broken link

* docs(errors): fix broken links
  • Loading branch information
Fdawgs committed Feb 24, 2021
1 parent 995e441 commit ab93c73
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/Ecosystem.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ Plugins maintained by the Fastify team are listed under [Core](#core) while plug
- [`fastify-wamp-router`](https://github.com/lependu/fastify-wamp-router) Web Application Messaging Protocol router for Fastify.
- [`fast-water`](https://github.com/tswayne/fast-water) A Fastify plugin for waterline. Decorates Fastify with waterline models.
- [`fastify-webpack-hmr`](https://github.com/lependu/fastify-webpack-hmr) Webpack hot module reloading plugin for Fastify.
- [`fastify-ws`](https://github.com/gj/fastify-ws) WebSocket integration for Fastify — with support for WebSocket lifecycle hooks instead of a single handler function. Built upon [ws](https://github.com/websockets/ws) and [uws](https://github.com/uNetworking/bindings/tree/master/nodejs).
- [`fastify-ws`](https://github.com/gj/fastify-ws) WebSocket integration for Fastify — with support for WebSocket lifecycle hooks instead of a single handler function. Built upon [ws](https://github.com/websockets/ws) and [uws](https://github.com/uNetworking/uWebSockets).
- [`fastify-xml-body-parser`](https://github.com/NaturalIntelligence/fastify-xml-body-parser) Parse XML payload / request body into JS / JSON object.
- [`fastify-xray`](https://github.com/jeromemacias/fastify-xray) Fastify plugin for AWS XRay recording.
- [`i18next-http-middleware`](https://github.com/i18next/i18next-http-middleware#fastify-usage) An [i18next](https://www.i18next.com) based i18n (internationalization) middleware to be used with Node.js web frameworks like express or `Fastify` and also for Deno.
Expand Down
4 changes: 2 additions & 2 deletions docs/Errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ For customizing this behaviour, you should use [`setErrorHandler`](Server.md#set

### Errors In Fastify Lifecycle Hooks And A Custom Error Handler

From the [Hooks documentation](Hooks/#manage-errors-from-a-hook):
From the [Hooks documentation](Hooks.md#manage-errors-from-a-hook):
> If you get an error during the execution of your hook, just pass it to `done()` and Fastify will automatically close the request and send the appropriate error code to the user.
If you have defined a custom error handler for using `setErrorHandler` the error will be routed there, otherwise it will be routed to Fastify’s generic error handler.

Some things to consider in your custom error handler:

- you can `reply.send(data)` which will be behave as it would be in [regular route handlers](Reply/#senddata)
- you can `reply.send(data)` which will be behave as it would be in [regular route handlers](Reply.md#senddata)
- objects are serialised, triggering the `preSerialization` lifecycle hook if you have one defined
- strings, buffers, and streams are sent to the client, with appropriate headers (no serialization)

Expand Down

0 comments on commit ab93c73

Please sign in to comment.