Skip to content

fix(api): fix POST /config/graph AttributeError (req.name -> req.graph)#337

Merged
imbajin merged 2 commits into
apache:mainfrom
linmengmeng-1314:fix/graph-config-attribute-error
May 19, 2026
Merged

fix(api): fix POST /config/graph AttributeError (req.name -> req.graph)#337
imbajin merged 2 commits into
apache:mainfrom
linmengmeng-1314:fix/graph-config-attribute-error

Conversation

@linmengmeng-1314
Copy link
Copy Markdown
Contributor

Summary

  • Fix req.name to req.graph in rag_api.py:158 to match the GraphConfigRequest model field name

Fixes #330

Test plan

  • ruff format --check . and ruff check . pass
  • Verify POST /config/graph returns success instead of 500

🤖 Generated with Claude Code

Fixes apache#330

The GraphConfigRequest model defines the field as `graph`, but
rag_api.py was using `req.name`, causing a 500 error on every call.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. bug Something isn't working labels May 19, 2026
@github-actions github-actions Bot added the llm label May 19, 2026
- add TestClient coverage for POST /config/graph
- verify graph request field is passed to apply_graph_conf
- keep the API test isolated with mock dependencies
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label May 19, 2026
@imbajin imbajin merged commit e14c25d into apache:main May 19, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working lgtm This PR has been approved by a maintainer llm size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: POST /config/graph API crashes with AttributeError (req.name vs req.graph)

3 participants