Skip to content

refactor(constants): complete error_constants adoption (#3550)#3559

Merged
mrveiss merged 1 commit intoDev_new_guifrom
issue-3550
Apr 6, 2026
Merged

refactor(constants): complete error_constants adoption (#3550)#3559
mrveiss merged 1 commit intoDev_new_guifrom
issue-3550

Conversation

@mrveiss
Copy link
Copy Markdown
Owner

@mrveiss mrveiss commented Apr 6, 2026

Summary

Completes the error_constants adoption started in PR #3539, addressing all gaps found in the post-merge code review.

Changes

  • services/autoresearch/routes.py — wire ERR_SESSION_NOT_FOUND (1 site)
  • api/knowledge_metadata.py — wire ERR_TEMPLATE_NOT_FOUND (1 site)
  • constants/error_constants.py — remove ERR_NOT_FOUND and ERR_FAILED_TO (zero call sites; the "Failed to {operation}" pattern is too varied across 30+ sites to adopt uniformly — dead constants violate project rules)
  • constants/__init__.py — remove ERR_NOT_FOUND and ERR_FAILED_TO from import block and __all__
  • api/api_endpoint_migrations_test.py — update inspect.getsource() assertion for schedule_template_workflow to check for ERR_TEMPLATE_NOT_FOUND instead of the literal string

Closes #3550

…ng sites, remove dead constants (#3550)

- Wire ERR_SESSION_NOT_FOUND in services/autoresearch/routes.py
- Wire ERR_TEMPLATE_NOT_FOUND in api/knowledge_metadata.py
- Remove ERR_NOT_FOUND and ERR_FAILED_TO (zero call sites, too varied
  for the template pattern — dead constants violate project rules)
- Remove ERR_NOT_FOUND and ERR_FAILED_TO from constants/__init__.py __all__
- Update api_endpoint_migrations_test.py inspect.getsource assertion for
  scheduler.schedule_template_workflow to check ERR_TEMPLATE_NOT_FOUND

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mrveiss mrveiss merged commit 9af3f44 into Dev_new_gui Apr 6, 2026
1 of 4 checks passed
@mrveiss mrveiss deleted the issue-3550 branch April 6, 2026 08:18
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