Skip to content

docs: fix interceptor order description in compose method #4251

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 2, 2025

Conversation

mcollina
Copy link
Member

@mcollina mcollina commented Jun 1, 2025

The documentation incorrectly stated that the first interceptor would be called first, but due to function composition, the last interceptor in the array is actually called first.

Fixes #4241

🤖 Generated with Claude Code

This relates to...

Rationale

Changes

Features

Bug Fixes

Breaking Changes and Deprecations

Status

@ronag
Copy link
Member

ronag commented Jun 2, 2025

The request goes bottom => top and the response goes top => bottom. Would be nice to have a visualization.

The documentation incorrectly stated that the first interceptor
would be called first, but due to function composition, the last
interceptor in the array is actually called first.

Added ASCII art diagram showing the interceptor stack and request
flow to make the execution order clear.

Fixes #4241

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Matteo Collina <hello@matteocollina.com>
@mcollina mcollina force-pushed the fix-interceptor-docs-4241 branch from cfbdde2 to 1075912 Compare June 2, 2025 07:32
@mcollina
Copy link
Member Author

mcollina commented Jun 2, 2025

@ronag I've asked Claude to draw it. I guess it's better than nothing!

Copy link
Member

@ronag ronag left a comment

Choose a reason for hiding this comment

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

Awesome!

@mcollina mcollina merged commit b87dcc2 into main Jun 2, 2025
33 of 36 checks passed
@metcoder95 metcoder95 deleted the fix-interceptor-docs-4241 branch June 2, 2025 08:31
@github-actions github-actions bot mentioned this pull request Jun 26, 2025
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.

First interceptor in compose is not the first to be called
2 participants