---
title: "fastify 5.12.8 Breaking Changes on npm | Since.dev"
description: "What each fastify release removed, renamed or changed: 196 breaking changes in 22 versions on npm, each with its source."
canonical_url: https://since.dev/packages/npm/fastify
last_updated: 2026-12-04
---

# fastify breaking changes

fastify 5.12.8 (November 2, 2026) is its newest release with breaking changes, 3 of them. The first: Error status codes are now clamped to 400-599, with 500 as fallback in fastify 5.12.8. Every breaking API change we have recorded in fastify on npm: 196 breaking changes in 22 versions. Below, its 22 versions with breaking changes, newest first, removals and renames first, each with its source.

Updated December 4, 2026

Latest version `5.12.8`, released November 2, 2026. [Source repository](https://github.com/fastify/fastify)

Packages on npm run on Node.js. [Node.js end of life dates](https://since.dev/calendar/nodejs.md).

- From [5.0.0](#v-5-0-0) to [5.12.8](#v-5-12-8): 94 breaking changes in 21 versions.

## fastify 5.12.8 breaking changes

fastify 5.12.8, released November 2, 2026: 3 breaking changes.

- **Behavior changed**  

Errors with a statusCode outside 400-599 now get a status of 500 instead of the original value. Code that relies on other status codes for errors must be updated. [github.com](https://github.com/fastify/fastify/releases/tag/v5.12.8)
- **Signature changed** `FastifyInstance.addresses`  

Was addresses(): AddressInfo\[\]; now addresses(): Array\<AddressInfo | string>. [npmjs.com](https://www.npmjs.com/package/fastify/v/5.12.8)
- **Signature changed** `FastifyRouterOptions`  

Was type FastifyRouterOptions\<RawServer extends RawServerBase> = Omit\<FindMyWayConfigForServer\<RawServer>, 'defaultRoute' | 'onBadUrl' | 'onMaxParamLength' | 'querystringParser'> & {defaultRoute?: (req... [npmjs.com](https://www.npmjs.com/package/fastify/v/5.12.8)

## fastify 5.12.6 breaking changes

fastify 5.12.6, released October 13, 2026: 3 breaking changes.

- **Signature changed**  

The TypeScript types for route lookup methods are narrowed, so TypeScript code that relied on the broader types may now fail to compile. [github.com](https://github.com/fastify/fastify/releases/tag/v5.12.6)
- **Signature changed** `FastifyInstance.findRoute`  

Was findRoute\<RouteGeneric extends RouteGenericInterface = RouteGenericInterface, ContextConfig = ContextConfigDefault, SchemaCompiler extends FastifySchema = FastifySchema>(opts: Pick\<RouteOptions\<RawServer, RawRequest, RawReply... [npmjs.com](https://www.npmjs.com/package/fastify/v/5.12.6)
- **Signature changed** `FastifyInstance.hasRoute`  

Was hasRoute\<RouteGeneric extends RouteGenericInterface = RouteGenericInterface, ContextConfig = ContextConfigDefault, SchemaCompiler extends FastifySchema = FastifySchema>(opts: Pick\<RouteOptions\<RawServer, RawRequest, RawReply... [npmjs.com](https://www.npmjs.com/package/fastify/v/5.12.6)

## fastify 5.12.1 breaking changes

fastify 5.12.1, released August 18, 2026: 6 breaking changes.

- **Signature changed** `FastifyHttp2Options.trustProxy`  

Was trustProxy?: boolean | string | string\[\] | number | TrustProxyFunction; now trustProxy?: boolean | string | string\[\] | TrustProxyFunction. [npmjs.com](https://www.npmjs.com/package/fastify/v/5.12.1)
- **Signature changed** `FastifyHttp2SecureOptions.trustProxy`  

Was trustProxy?: boolean | string | string\[\] | number | TrustProxyFunction; now trustProxy?: boolean | string | string\[\] | TrustProxyFunction. [npmjs.com](https://www.npmjs.com/package/fastify/v/5.12.1)
- **Signature changed** `FastifyHttpOptions.trustProxy`  

Was trustProxy?: boolean | string | string\[\] | number | TrustProxyFunction; now trustProxy?: boolean | string | string\[\] | TrustProxyFunction. [npmjs.com](https://www.npmjs.com/package/fastify/v/5.12.1)
- **Signature changed** `FastifyHttpsOptions.trustProxy`  

Was trustProxy?: boolean | string | string\[\] | number | TrustProxyFunction; now trustProxy?: boolean | string | string\[\] | TrustProxyFunction. [npmjs.com](https://www.npmjs.com/package/fastify/v/5.12.1)
- **Signature changed** `FastifyServerOptions`  

Was type FastifyServerOptions\<RawServer extends RawServerBase = RawServerDefault, Logger extends FastifyBaseLogger = FastifyBaseLogger> = {ignoreTrailingSlash?: boolean, ignoreDuplicateSlashes?: boolean, connectionTimeout?: number... [npmjs.com](https://www.npmjs.com/package/fastify/v/5.12.1)
- **Signature changed** `FastifyServerOptions.trustProxy`  

Was trustProxy?: boolean | string | string\[\] | number | TrustProxyFunction; now trustProxy?: boolean | string | string\[\] | TrustProxyFunction. [npmjs.com](https://www.npmjs.com/package/fastify/v/5.12.1)

## fastify 5.12.0 breaking changes

fastify 5.12.0, released August 13, 2026: 1 breaking change.

- **Behavior changed**  

Invalid media types now yield undefined instead of the previous result. Code that checks the parsed content type for invalid input should handle undefined. [github.com](https://github.com/fastify/fastify/releases/tag/v5.12.0)

## fastify 5.11.3 breaking changes

fastify 5.11.3, released August 8, 2026: 1 breaking change.

- **Signature changed** `LogController.requestCompleted`  

Was requestCompleted (error: Error | null, request: FastifyRequest, reply: FastifyReply, metadata?: Record\<string, unknown>): void; now requestCompleted (error: Error | null | undefined, request: FastifyRequest, reply: FastifyReply... [npmjs.com](https://www.npmjs.com/package/fastify/v/5.11.3)

## fastify 5.11.1 breaking changes

fastify 5.11.1, released August 3, 2026: 3 breaking changes.

- **Signature changed** `FastifyHttpOptions`  

Was type FastifyHttpOptions\<Server extends http.Server, Logger extends FastifyBaseLogger = FastifyBaseLogger> = FastifyServerOptions\<Server, Logger> & {http?: http.ServerOptions | null}; now type FastifyHttpOptions\<Server extends... [npmjs.com](https://www.npmjs.com/package/fastify/v/5.11.1)
- **Signature changed** `FastifyHttpsOptions`  

Was type FastifyHttpsOptions\<Server extends https.Server, Logger extends FastifyBaseLogger = FastifyBaseLogger> = FastifyServerOptions\<Server, Logger> & {https: https.ServerOptions | null}; now type FastifyHttpsOptions\<Server extends... [npmjs.com](https://www.npmjs.com/package/fastify/v/5.11.1)
- **Signature changed** `FastifyInstance.addHttpMethod`  

Was addHttpMethod(method: string, methodOptions?: {hasBody: boolean}): FastifyInstance\<RawServer, RawRequest, RawReply, Logger, TypeProvider>; now addHttpMethod(method: string, methodOptions?: {hasBody?: boolean; overrideExisting?... [npmjs.com](https://www.npmjs.com/package/fastify/v/5.11.1)

## Older versions

16 older versions, each with its first changes. [Sign up to see every change](https://app.since.dev/login?mode=signup&src=package-page)

### fastify 5.11.0 breaking changes

fastify 5.11.0, released July 30, 2026: 1 breaking change.

- **Signature changed** `FastifyErrorCodes`  

Was type FastifyErrorCodes = Record<'FST_ERR_NOT_FOUND' | 'FST_ERR_OPTIONS_NOT_OBJ' | 'FST_ERR_QSP_NOT_FN' | 'FST_ERR_SCHEMA_CONTROLLER_BUCKET_OPT_NOT_FN' | 'FST_ERR_SCHEMA_ERROR_FORMATTER_NOT_FN' | 'FST_ERR_AJV_CUSTOM_OPTIONS_OPT_NOT_OBJ'... [npmjs.com](https://www.npmjs.com/package/fastify/v/5.11.0)

### fastify 5.10.0 breaking changes

fastify 5.10.0, released July 5, 2026: 3 breaking changes.

- **Behavior changed** `request.port`  

request.port is now taken from request.host, so code reading request.port may see different values than before. [github.com](https://github.com/fastify/fastify/releases/tag/v5.10.0)
- **Signature changed** `FastifyErrorCodes`  

Was type FastifyErrorCodes = Record<'FST_ERR_NOT_FOUND' | 'FST_ERR_OPTIONS_NOT_OBJ' | 'FST_ERR_QSP_NOT_FN' | 'FST_ERR_SCHEMA_CONTROLLER_BUCKET_OPT_NOT_FN' | 'FST_ERR_SCHEMA_ERROR_FORMATTER_NOT_FN' | 'FST_ERR_AJV_CUSTOM_OPTIONS_OPT_NOT_OBJ'... [npmjs.com](https://www.npmjs.com/package/fastify/v/5.10.0)

And 1 more in this version.

### fastify 5.9.0 breaking changes

fastify 5.9.0, released June 28, 2026: 6 breaking changes.

- **Behavior changed**  

Requests without a socket no longer take host or protocol from forwarded headers. Code that relied on those headers in that case must read them another way. [github.com](https://github.com/fastify/fastify/releases/tag/v5.9.0)
- **Behavior changed**  

checkDependencies now throws FST_ERR_PLUGIN_DEPENDENCY_NOT_REGISTERED instead of AssertionError. Code that catches AssertionError for this case must check the new error code. [github.com](https://github.com/fastify/fastify/releases/tag/v5.9.0)

And 4 more in this version.

### fastify 5.8.3 breaking changes

fastify 5.8.3, released March 23, 2026: 1 breaking change.

- **Signature changed** `FastifyRequest.port`  

Was readonly port: number; now readonly port: number | null. [npmjs.com](https://www.npmjs.com/package/fastify/v/5.8.3)

### fastify 5.8.0 breaking changes

fastify 5.8.0, released March 5, 2026: 12 breaking changes.

- **Signature changed** `FastifyErrorCodes`  

Was type FastifyErrorCodes = Record<'FST_ERR_NOT_FOUND' | 'FST_ERR_OPTIONS_NOT_OBJ' | 'FST_ERR_QSP_NOT_FN' | 'FST_ERR_SCHEMA_CONTROLLER_BUCKET_OPT_NOT_FN' | 'FST_ERR_SCHEMA_ERROR_FORMATTER_NOT_FN' | 'FST_ERR_AJV_CUSTOM_OPTIONS_OPT_NOT_OBJ'... [npmjs.com](https://www.npmjs.com/package/fastify/v/5.8.0)
- **Signature changed** `FastifyServerOptions`  

Was type FastifyServerOptions\<RawServer extends RawServerBase = RawServerDefault, Logger extends FastifyBaseLogger = FastifyBaseLogger> = {ignoreTrailingSlash?: boolean, ignoreDuplicateSlashes?: boolean, connectionTimeout?: number... [npmjs.com](https://www.npmjs.com/package/fastify/v/5.8.0)

And 10 more in this version.

### fastify 5.7.2 breaking changes

fastify 5.7.2, released January 26, 2026: 1 breaking change.

- **Behavior changed**  

The content-type header is now parsed by a strict parser that accepts only values in the RFC 9110 form. Requests with non-compliant content-type values may now be rejected, so check clients that send unusual values. [github.com](https://github.com/fastify/fastify/releases/tag/v5.7.2)

### fastify 5.7.0 breaking changes

fastify 5.7.0, released January 15, 2026: 34 breaking changes.

- **Removed** `FastifyHttp2Options.ajv.customOptions`  

FastifyHttp2Options.ajv.customOptions was removed in fastify 5.7.0 [npmjs.com](https://www.npmjs.com/package/fastify/v/5.7.0)
- **Removed** `FastifyHttp2Options.ajv.plugins`  

FastifyHttp2Options.ajv.plugins was removed in fastify 5.7.0 [npmjs.com](https://www.npmjs.com/package/fastify/v/5.7.0)

And 32 more in this version.

### fastify 5.6.2 breaking changes

fastify 5.6.2, released November 9, 2025: 2 breaking changes.

- **Signature changed** `FastifyInstance.errorHandler`  

Was errorHandler: (error: FastifyError, request: FastifyRequest, reply: FastifyReply) => void; now errorHandler: \<TError = unknown>(error: TError, request: FastifyRequest, reply: FastifyReply) => void. [npmjs.com](https://www.npmjs.com/package/fastify/v/5.6.2)
- **Signature changed** `FastifyInstance.setErrorHandler`  

The error parameter type for setErrorHandler and errorHandler is now unknown instead of any, though it can be set through the generic TError. TypeScript code that relied on the error being typed as any may need a type annotation or the... [npmjs.com](https://www.npmjs.com/package/fastify/v/5.6.2)

### fastify 5.6.0 breaking changes

fastify 5.6.0, released September 5, 2025: 3 breaking changes.

- **Signature changed** `FastifyBaseLogger`  

Was interface FastifyBaseLogger extends pino.BaseLogger; now interface FastifyBaseLogger extends Pick\<BaseLogger, 'level' | 'info' | 'error' | 'debug' | 'fatal' | 'warn' | 'trace' | 'silent'>. [npmjs.com](https://www.npmjs.com/package/fastify/v/5.6.0)
- **Signature changed** `FastifyInstance.initialConfig`  

Was initialConfig: Readonly<{connectionTimeout?: number, keepAliveTimeout?: number, forceCloseConnections?: boolean, bodyLimit?: number, caseSensitive?: boolean, allowUnsafeRegex?: boolean, http2?: boolean, https?: boolean |... [npmjs.com](https://www.npmjs.com/package/fastify/v/5.6.0)

And 1 more in this version.

### fastify 5.5.0 breaking changes

fastify 5.5.0, released August 11, 2025: 4 breaking changes.

- **Configuration changed**  

Router options are now set under their own key rather than at the top level of the options object. Users who pass router options must move them to that key. [github.com](https://github.com/fastify/fastify/releases/tag/v5.5.0)
- **Signature changed** `FastifyErrorCodes`  

Was type FastifyErrorCodes = Record<'FST_ERR_NOT_FOUND' | 'FST_ERR_OPTIONS_NOT_OBJ' | 'FST_ERR_QSP_NOT_FN' | 'FST_ERR_SCHEMA_CONTROLLER_BUCKET_OPT_NOT_FN' | 'FST_ERR_SCHEMA_ERROR_FORMATTER_NOT_FN' | 'FST_ERR_AJV_CUSTOM_OPTIONS_OPT_NOT_OBJ'... [npmjs.com](https://www.npmjs.com/package/fastify/v/5.5.0)

And 2 more in this version.

### fastify 5.4.0 breaking changes

fastify 5.4.0, released June 12, 2025: 1 breaking change.

- **Signature changed** `FastifyServerOptions`  

Was type FastifyServerOptions\<RawServer extends RawServerBase = RawServerDefault, Logger extends FastifyBaseLogger = FastifyBaseLogger> = {ignoreTrailingSlash?: boolean, ignoreDuplicateSlashes?: boolean, connectionTimeout?: number... [npmjs.com](https://www.npmjs.com/package/fastify/v/5.4.0)

### fastify 5.3.3 breaking changes

fastify 5.3.3, released May 13, 2025: 1 breaking change.

- **Signature changed** `FastifyErrorCodes`  

Was type FastifyErrorCodes = Record<'FST_ERR_NOT_FOUND' | 'FST_ERR_OPTIONS_NOT_OBJ' | 'FST_ERR_QSP_NOT_FN' | 'FST_ERR_SCHEMA_CONTROLLER_BUCKET_OPT_NOT_FN' | 'FST_ERR_SCHEMA_ERROR_FORMATTER_NOT_FN' | 'FST_ERR_AJV_CUSTOM_OPTIONS_OPT_NOT_OBJ'... [npmjs.com](https://www.npmjs.com/package/fastify/v/5.3.3)

### fastify 5.3.2 breaking changes

fastify 5.3.2, released April 18, 2025: 1 breaking change.

- **Behavior changed**  

Content-type headers are now parsed with a space treated as a delimiter, which closes a validation bypass. Requests whose content-type relied on the old parsing may now be handled differently. [github.com](https://github.com/fastify/fastify/releases/tag/v5.3.2)

### fastify 5.2.0 breaking changes

fastify 5.2.0, released December 14, 2024: 1 breaking change.

- **Removed** `FastifyRequest.connection`  

The connection property was removed from the FastifyRequest TypeScript type, so code that reads request.connection in typed code will no longer compile. [npmjs.com](https://www.npmjs.com/package/fastify/v/5.2.0)

### fastify 5.1.0 breaking changes

fastify 5.1.0, released October 31, 2024: 6 breaking changes.

- **Behavior changed** `fastify`  

Fastify now makes a shallow copy of the options object before changing it, so code that relied on the passed-in options object being modified must read the values from its own copy instead. [github.com](https://github.com/fastify/fastify/releases/tag/v5.1.0)
- **Signature changed**  

TypeScript users whose plugin options have defined properties must now pass the options object, so existing calls that omit it may fail to type-check. [github.com](https://github.com/fastify/fastify/releases/tag/v5.1.0)

And 4 more in this version.

### fastify 5.0.0 breaking changes

fastify 5.0.0, released September 17, 2024: 102 breaking changes.

- **Removed** `FastifyHttp2Options.jsonShorthand`  

FastifyHttp2Options.jsonShorthand was removed in fastify 5.0.0 [npmjs.com](https://www.npmjs.com/package/fastify/v/5.0.0)
- **Removed** `FastifyHttp2Options.versioning`  

FastifyHttp2Options.versioning was removed in fastify 5.0.0 [npmjs.com](https://www.npmjs.com/package/fastify/v/5.0.0)

And 100 more in this version.

## Related packages

- [fastify-plugin](https://since.dev/packages/npm/fastify-plugin.md)

## Check your code

These are the changes. To see which of them reach your code, [scan a public repository](https://since.dev/scan.md), or have your coding agent call `check_code` with your manifest or lockfile over [MCP](https://since.dev/docs.md#mcp). [The API](https://since.dev/docs.md#api) reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

## Put your code on continuous maintenance.

Scan a public repository now, or give your agent one line.

[Scan a repository](https://since.dev/scan.md). Any public GitHub repository. No sign-in.

### Tell your agent what changed since it was trained.

`claude mcp add --transport http since https://api.since.dev/mcp`

[Get an API key](https://app.since.dev/login?mode=signup)

Codex, Cursor and any MCP client use https://api.since.dev/mcp.

---

Every page on this site as Markdown: https://since.dev/sitemap.md. For agents: https://since.dev/llms.txt.
