Skip to content

Improve LakeFS error handling with centralized exception wrapper #4176

@xuang7

Description

@xuang7

Feature Summary

Add centralized error handling for LakeFS API calls to properly convert io.lakefs.clients.sdk.ApiException to appropriate HTTP exceptions with meaningful error messages visible to frontend.

Problem
Currently, LakeFS API exceptions are not handled consistently across the codebase (e.g., DatasetResource).
In multipart upload flows, some failures often surface as DataAccessException without the original LakeFS error context, which makes issues hard to reproduce and debug from both backend logs and frontend responses.

Proposed Solution or Design

Add handleLakeFSException to convert LakeFS ApiException to JAX-RS exceptions (400, 401, 403, 404, 409, 500, etc.)

Impact / Priority

(P2)Medium – useful enhancement

Affected Area

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    triagePending for triaging

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions