Skip to content

Commit 1851f20

Browse files
authored
docs: update links (fastify#6593)
* docs: update links * docs: update links * docs: update links * docs: update links * docs: update links * docs: update links
1 parent 9cc5187 commit 1851f20

File tree

5 files changed

+20
-20
lines changed

5 files changed

+20
-20
lines changed

docs/Guides/Migration-Guide-V5.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ and [#4682](https://github.com/fastify/fastify/issues/4682) for more information
540540
The `getDefaultRoute` and `setDefaultRoute` methods have been removed in v5.
541541
542542
See [#4485](https://github.com/fastify/fastify/pull/4485)
543-
and [#4480](https://github.com/fastify/fastify/pull/4485)
543+
and [#4480](https://github.com/fastify/fastify/pull/4480)
544544
for more information.
545545
This was already deprecated in v4 as `FSTDEP014`,
546546
so you should have already updated your code.

docs/Reference/Errors.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,12 @@
109109
#### Uncaught Errors
110110
In Node.js, uncaught errors can cause memory leaks, file descriptor leaks, and
111111
other major production issues.
112-
[Domains](https://nodejs.org/en/docs/guides/domain-postmortem/) were a failed
112+
[Domains](https://nodejs.org/en/blog/community/domain-postmortem) were a failed
113113
attempt to fix this.
114114

115115
Given that it is not possible to process all uncaught errors sensibly, the best
116116
way to deal with them is to
117-
[crash](https://nodejs.org/api/process.html#process_warning_using_uncaughtexception_correctly).
117+
[crash](https://nodejs.org/api/process.html#warning-using-uncaughtexception-correctly).
118118

119119
#### Catching Errors In Promises
120120
When using promises, attach a `.catch()` handler synchronously.
@@ -312,7 +312,7 @@ Below is a table with all the error codes used by Fastify.
312312
| <a id="fst_err_dec_missing_dependency">FST_ERR_DEC_MISSING_DEPENDENCY</a> | The decorator cannot be registered due to a missing dependency. | Register the missing dependency. | [#1168](https://github.com/fastify/fastify/pull/1168) |
313313
| <a id="fst_err_dec_after_start">FST_ERR_DEC_AFTER_START</a> | The decorator cannot be added after start. | Add the decorator before starting the server. | [#2128](https://github.com/fastify/fastify/pull/2128) |
314314
| <a id="fst_err_dec_reference_type">FST_ERR_DEC_REFERENCE_TYPE</a> | The decorator cannot be a reference type. | Define the decorator with a getter/setter interface or an empty decorator with a hook. | [#5462](https://github.com/fastify/fastify/pull/5462) |
315-
| <a id="fst_err_dec_undeclared">FST_ERR_DEC_UNDECLARED</a> | An attempt was made to access a decorator that has not been declared. | Declare the decorator before using it. | [#](https://github.com/fastify/fastify/pull/)
315+
| <a id="fst_err_dec_undeclared">FST_ERR_DEC_UNDECLARED</a> | An attempt was made to access a decorator that has not been declared. | Declare the decorator before using it. | [#5768](https://github.com/fastify/fastify/pull/5768)
316316
| <a id="fst_err_hook_invalid_type">FST_ERR_HOOK_INVALID_TYPE</a> | The hook name must be a string. | Use a string for the hook name. | [#1168](https://github.com/fastify/fastify/pull/1168) |
317317
| <a id="fst_err_hook_invalid_handler">FST_ERR_HOOK_INVALID_HANDLER</a> | The hook callback must be a function. | Use a function for the hook callback. | [#1168](https://github.com/fastify/fastify/pull/1168) |
318318
| <a id="fst_err_hook_invalid_async_handler">FST_ERR_HOOK_INVALID_ASYNC_HANDLER</a> | Async function has too many arguments. Async hooks should not use the `done` argument. | Remove the `done` argument from the async hook. | [#4367](https://github.com/fastify/fastify/pull/4367) |

docs/Reference/Server.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ This option also applies when the [`http2`](#factory-http2) option is set.
143143

144144
Defines the server timeout in milliseconds. See documentation for
145145
[`server.timeout`
146-
property](https://nodejs.org/api/http.html#http_server_timeout) to understand
146+
property](https://nodejs.org/api/http.html#servertimeout) to understand
147147
the effect of this option.
148148

149149
When `serverFactory` option is specified this option is ignored.
@@ -155,7 +155,7 @@ When `serverFactory` option is specified this option is ignored.
155155

156156
Defines the server keep-alive timeout in milliseconds. See documentation for
157157
[`server.keepAliveTimeout`
158-
property](https://nodejs.org/api/http.html#http_server_keepalivetimeout) to
158+
property](https://nodejs.org/api/http.html#serverkeepalivetimeout) to
159159
understand the effect of this option. This option only applies when HTTP/1 is in
160160
use.
161161

@@ -198,7 +198,7 @@ method, otherwise attempting to set it will throw an exception.
198198

199199
Defines the maximum number of requests a socket can handle before closing keep
200200
alive connection. See [`server.maxRequestsPerSocket`
201-
property](https://nodejs.org/dist/latest/docs/api/http.html#http_server_maxrequestspersocket)
201+
property](https://nodejs.org/dist/latest/docs/api/http.html#servermaxrequestspersocket)
202202
to understand the effect of this option. This option only applies when HTTP/1.1
203203
is in use. Also, when `serverFactory` option is specified, this option is
204204
ignored.
@@ -213,7 +213,7 @@ ignored.
213213

214214
Defines the maximum number of milliseconds for receiving the entire request from
215215
the client. See [`server.requestTimeout`
216-
property](https://nodejs.org/dist/latest/docs/api/http.html#http_server_requesttimeout)
216+
property](https://nodejs.org/dist/latest/docs/api/http.html#servertimeout)
217217
to understand the effect of this option.
218218

219219
When `serverFactory` option is specified, this option is ignored.
@@ -335,7 +335,7 @@ This property is used to configure the internal logger instance.
335335
The possible values this property may have are:
336336

337337
+ Default: `false`. The logger is disabled. All logging methods will point to a
338-
null logger [abstract-logging](https://npm.im/abstract-logging) instance.
338+
null logger [abstract-logging](https://www.npmjs.com/package/abstract-logging) instance.
339339

340340
+ `object`: a standard Pino [options
341341
object](https://github.com/pinojs/pino/blob/c77d8ec5ce/docs/API.md#constructor).
@@ -730,7 +730,7 @@ const fastify = require('fastify')({
730730
<a id="client-error-handler"></a>
731731
732732
Set a
733-
[clientErrorHandler](https://nodejs.org/api/http.html#http_event_clienterror)
733+
[clientErrorHandler](https://nodejs.org/api/http.html#event-clienterror)
734734
that listens to `error` events emitted by client connections and responds with a
735735
`400`.
736736
@@ -1013,7 +1013,7 @@ be invoked.
10131013

10141014
This can be useful especially if you have a regex-based route, protecting you
10151015
against [ReDoS
1016-
attacks](https://www.owasp.org/index.php/Regular_expression_Denial_of_Service_-_ReDoS).
1016+
attacks](https://owasp.org/www-community/attacks/Regular_expression_Denial_of_Service_-_ReDoS).
10171017

10181018

10191019
### `onBadUrl`
@@ -1129,7 +1129,7 @@ app.setErrorHandler(function anotherErrorHandler () {
11291129
<a id="server"></a>
11301130
11311131
`fastify.server`: The Node core
1132-
[server](https://nodejs.org/api/http.html#http_class_http_server) object as
1132+
[server](https://nodejs.org/api/http.html#class-httpserver) object as
11331133
returned by the [**`Fastify factory function`**](#factory).
11341134
11351135
> ⚠ Warning:
@@ -1243,7 +1243,7 @@ addresses](https://nodejs.org/api/net.html#serverlistenport-host-backlog-callbac
12431243
12441244
Be careful when deciding to listen on all interfaces; it comes with inherent
12451245
[security
1246-
risks](https://web.archive.org/web/20170831174611/https://snyk.io/blog/mongodb-hack-and-secure-defaults/).
1246+
risks](https://web.archive.org/web/20170711105010/https://snyk.io/blog/mongodb-hack-and-secure-defaults/).
12471247
12481248
The default is to listen on `port: 0` (which picks the first available open
12491249
port) and `host: 'localhost'`:
@@ -2283,7 +2283,7 @@ test('Uses app and closes it afterwards', async () => {
22832283
In the above example, Fastify is closed automatically after the test finishes.
22842284
22852285
Read more about the
2286-
[ECMAScript Explicit Resource Management](https://tc39.es/proposal-explicit-resource-management)
2286+
[ECMAScript Explicit Resource Management](https://tc39.es/proposal-explicit-resource-management/)
22872287
and the [using keyword](https://devblogs.microsoft.com/typescript/announcing-typescript-5-2/)
22882288
introduced in TypeScript 5.2.
22892289

docs/Reference/Warnings.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ Fastify uses Node.js's [warning event](https://nodejs.org/api/process.html#event
1818
API to notify users of deprecated features and coding mistakes. Fastify's
1919
warnings are recognizable by the `FSTWRN` and `FSTDEP` prefixes. When
2020
encountering such a warning, it is highly recommended to determine the cause
21-
using the [`--trace-warnings`](https://nodejs.org/api/cli.html#--trace-warnings)
22-
and [`--trace-deprecation`](https://nodejs.org/api/cli.html#--trace-deprecation)
21+
using the [`--trace-warnings`](https://nodejs.org/api/cli.html#trace-warnings)
22+
and [`--trace-deprecation`](https://nodejs.org/api/cli.html#trace-deprecation)
2323
flags. These produce stack traces pointing to where the issue occurs in the
2424
application's code. Issues opened about warnings without this information will
2525
be closed due to lack of details.
@@ -48,9 +48,9 @@ experienced users should consider disabling warnings.
4848

4949
Deprecation codes are supported by the Node.js CLI options:
5050

51-
- [--no-deprecation](https://nodejs.org/api/cli.html#--no-deprecation)
52-
- [--throw-deprecation](https://nodejs.org/api/cli.html#--throw-deprecation)
53-
- [--trace-deprecation](https://nodejs.org/api/cli.html#--trace-deprecation)
51+
- [--no-deprecation](https://nodejs.org/api/cli.html#no-deprecation)
52+
- [--throw-deprecation](https://nodejs.org/api/cli.html#throw-deprecation)
53+
- [--trace-deprecation](https://nodejs.org/api/cli.html#trace-deprecation)
5454

5555

5656
| Code | Description | How to solve | Discussion |

fastify.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -922,7 +922,7 @@ function defaultBuildPrettyMeta (route) {
922922

923923
function defaultClientErrorHandler (err, socket) {
924924
// In case of a connection reset, the socket has been destroyed and there is nothing that needs to be done.
925-
// https://nodejs.org/api/http.html#http_event_clienterror
925+
// https://nodejs.org/api/http.html#event-clienterror
926926
if (err.code === 'ECONNRESET' || socket.destroyed) {
927927
return
928928
}

0 commit comments

Comments
 (0)