Skip to content

ref(service): Replace Error with anyhow-like struct with embedded kind#547

Draft
lcian wants to merge 9 commits into
mainfrom
lcian/refactor-service-error
Draft

ref(service): Replace Error with anyhow-like struct with embedded kind#547
lcian wants to merge 9 commits into
mainfrom
lcian/refactor-service-error

Conversation

@lcian

@lcian lcian commented Jul 9, 2026

Copy link
Copy Markdown
Member

Replaces the objectstore_service::error::Error enum with a struct containing an independent ErrorKind classification and an anyhow::Error diagnostic.

This separates error classification from error origin: anyhow preserves the source and stacked context chain, while backends can reclassify errors with .kind() and add context with .context() without map_err boilerplate. The API maps the flat ErrorKind to HTTP status codes.

Closes FS-358
Ref FS-439

@codecov

This comment has been minimized.

@lcian lcian changed the title wip ref(service): Change service Error to an anyhow-like struct with attached kind Jul 13, 2026
@linear-code

This comment has been minimized.

@lcian lcian changed the title ref(service): Change service Error to an anyhow-like struct with attached kind ref(service): Replace Error enum with anyhow-like Error struct + ErrorKind Jul 13, 2026
@lcian lcian changed the title ref(service): Replace Error enum with anyhow-like Error struct + ErrorKind ref(service): Replace Error enum with anyhow-like Error struct + kind Jul 13, 2026
@lcian lcian changed the title ref(service): Replace Error enum with anyhow-like Error struct + kind ref(service): Replace Error with anyhow-like struct with embedded kind Jul 13, 2026
@lcian

This comment has been minimized.

Comment thread objectstore-service/src/backend/extensions.rs
@lcian
lcian force-pushed the lcian/refactor-service-error branch from a89948f to 5aad828 Compare July 16, 2026 11:52
lcian and others added 3 commits July 16, 2026 13:56
Use the refactored service error APIs when resolving the merge with main. Borrow the task-drop error for logging and preserve ResultExt context conversion for invalid GCS MIME types.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@lcian

This comment has been minimized.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 1105da2. Configure here.

Comment thread objectstore-server/src/endpoints/common.rs Outdated
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