Skip to content

Let the adaptor take a prepared handler, not only a class - #10

Merged
noha merged 1 commit into
mainfrom
adaptor-takes-a-prepared-handler
Sep 17, 2026
Merged

noha merged 1 commit into
mainfrom
adaptor-takes-a-prepared-handler

Conversation

@noha

@noha noha commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Naming the handler class means execute says handlerClass new and uses the object in the same line - nobody ever holds it, so a handler that has to be told something cannot be told anything. A metrics endpoint that has to know which domains it exports, and under which prefix, has nowhere to be told.

A handler given as an object is now used as it is; given as a class, a fresh one per request as before. All four existing routes name a class and are untouched.

Naming the handler class means execute says handlerClass new and uses the
object in the same line - nobody ever holds it, so a handler that has to be
told something cannot be told anything. A metrics endpoint that has to know
which domains it exports, and under which prefix, has nowhere to be told.

A handler given as an object is now used as it is; given as a class, a fresh
one per request as before. All four existing routes name a class and are
untouched.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@noha
noha merged commit a6882b4 into main Sep 17, 2026
4 checks passed
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.

1 participant