Skip to content

docs: Corrections to Middleware page#485

Merged
developerjamiu merged 1 commit intomainfrom
docs/middleware-fact-check
May 7, 2026
Merged

docs: Corrections to Middleware page#485
developerjamiu merged 1 commit intomainfrom
docs/middleware-fact-check

Conversation

@developerjamiu
Copy link
Copy Markdown
Contributor

Summary

Fact-checked the Middleware page. One correction:

  • The Handler typedef was documented as Future<Response> Function(Request) but Relic actually defines it as FutureOr<Result> Function(Request). Result is a sealed type with Response, Hijack, and WebSocketUpgrade subclasses, which is why the example's if (result is Response) narrowing is required.

Added a one-line note explaining Result so readers can see why the type check exists.

Test plan

  • Render the page locally and confirm the typedef block reads correctly.

@developerjamiu developerjamiu requested review from Swiftaxe and Zfinix May 7, 2026 12:45
Copy link
Copy Markdown
Contributor

@Swiftaxe Swiftaxe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@developerjamiu developerjamiu merged commit b0fbcb2 into main May 7, 2026
4 checks passed
@developerjamiu developerjamiu deleted the docs/middleware-fact-check branch May 7, 2026 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants