Skip to content

refactor(error): finish ApiError phase3#398

Merged
TCP404 merged 6 commits into
mainfrom
boii/error-model-phase3
Jun 5, 2026
Merged

refactor(error): finish ApiError phase3#398
TCP404 merged 6 commits into
mainfrom
boii/error-model-phase3

Conversation

@TCP404
Copy link
Copy Markdown
Collaborator

@TCP404 TCP404 commented Jun 4, 2026

Summary

  • keep ApiError as the HTTP/API boundary type with AppError retained only as a compatibility alias
  • add clippy::disallowed_types enforcement so ApiError/AppError are blocked outside explicit boundary files
  • remove global DbError -> ApiError conversion and map DB errors at owning route boundaries
  • introduce crate-owned errors for agent, assistant, assets, system, and common crypto flows
  • finish Phase3 propagation through conversation, team, cron, channel, and route mapper tests without leaking HTTP errors into service/domain layers

Verification

  • cargo fmt --all -- --check
  • cargo check --workspace
  • cargo clippy --workspace -- -D warnings
  • cargo test -p aionui-common -p aionui-api-types -p aionui-db -p aionui-auth -p aionui-system -p aionui-assistant -p aionui-assets -p aionui-ai-agent -p aionui-conversation -p aionui-team -p aionui-cron -p aionui-channel -p aionui-shell -p aionui-mcp
  • cargo test --workspace

Notes

  • No new logging was added; the changes are error-type and boundary mapping refactors, and existing tests/error outputs cover observability for the affected flows.
  • just push will run the repository push gate before updating the branch.

@TCP404 TCP404 force-pushed the boii/error-model-phase3 branch from 9481f6f to fc64e69 Compare June 5, 2026 09:14
@TCP404 TCP404 force-pushed the boii/error-model-phase3 branch from fc64e69 to 02f42ca Compare June 5, 2026 09:59
@TCP404 TCP404 enabled auto-merge (squash) June 5, 2026 09:59
The managed-runtime background-prepare closure annotated its result
as aionui_common::ApiError, which trips the new disallowed_types lint
(ApiError is an HTTP boundary type, banned outside routes/middleware).
The closure only calls RuntimePrepareService methods that return
SystemError, so annotate with that crate-owned error instead.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@TCP404 TCP404 merged commit 37523ab into main Jun 5, 2026
5 checks passed
@TCP404 TCP404 deleted the boii/error-model-phase3 branch June 5, 2026 10:24
piorpua pushed a commit that referenced this pull request Jun 5, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.1.22](v0.1.21...v0.1.22)
(2026-06-05)


### Bug Fixes

* **acp:** stabilize mode and model source of truth
([#409](#409))
([300bb1e](300bb1e))
* **conversation:** align workspace path availability handling
([#410](#410))
([30bc96b](30bc96b))
* **file:** lazy load browse roots
([#406](#406))
([668c562](668c562))
* prepare managed acp tools locally without cdn
([#408](#408))
([2a48ae3](2a48ae3))


### Code Refactoring

* **error:** finish ApiError phase3
([#398](#398))
([37523ab](37523ab))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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