Skip to content

Fixing Extract and Enhance - #2

Open
Alicorn-Max-S wants to merge 3 commits into
diffbot:mainfrom
Alicorn-Max-S:main
Open

Fixing Extract and Enhance#2
Alicorn-Max-S wants to merge 3 commits into
diffbot:mainfrom
Alicorn-Max-S:main

Conversation

@Alicorn-Max-S

Copy link
Copy Markdown

These changes should fix the current extract and enhance issues. If you want more details about what changes, look at claude's commits.

claude and others added 3 commits August 10, 2026 01:37
get_http_request() already returns a Starlette Request, but it was being
re-wrapped as if it were a scope mapping. Construction survives because
HTTPConnection is a Mapping over scope, so the failure only surfaced on the
first .headers access, where Headers.__init__ does

    self._list = scope["headers"] = list(scope["headers"])

and raises TypeError: 'Request' object does not support item assignment.
The bare `except Exception: pass` swallowed that, leaving self.token at the
env default, which is None on the hosted multi-tenant server.

Use get_http_request() directly, drop the now-unused Request import, and
narrow the handler to RuntimeError around the get_http_request() call only.
RuntimeError is what fastmcp raises under stdio, which is the case the
handler exists to cover; the DIFFBOT_TOKEN fallback is kept for it. Header
and query-param parsing now sit outside the handler so real failures
surface instead of being swallowed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019czdCzXr51L4DmKN6wLz8K
…ally optional

name, url, location, email, employer, title and school are declared Optional
but had no defaults, so fastmcp marked all eight parameters required and a
schema-following client could not build a valid call.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019czdCzXr51L4DmKN6wLz8K
…-4p3uld

Fix token resolution: extract and enhance receive None on every request
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