fix(12): resolve critical code review findings (CR-01 through CR-04)
- CR-01: fix browse URL from /folders/{id} to /items?parent_ref= (broken feature)
- CR-02: remove raw provider exception text from _TerminalProviderError messages
- CR-03: add user_id predicate to get_or_create_folder_state query (ownership boundary)
- CR-04: add max_length=255 to ConnectionRenameRequest.display_name
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
de63e2a3a4
commit
b6911fb4ed
@@ -107,7 +107,7 @@ async def _run(user_id: str, connection_id: str, parent_ref: str | None) -> dict
|
||||
error_message="Credential decryption failed. Re-connect the account.",
|
||||
)
|
||||
await session.commit()
|
||||
raise _TerminalProviderError(f"Credential decryption failed: {exc}") from exc
|
||||
raise _TerminalProviderError("Credential decryption failed. Re-connect the account.") from exc
|
||||
|
||||
# Build adapter and fetch listing
|
||||
try:
|
||||
@@ -133,9 +133,9 @@ async def _run(user_id: str, connection_id: str, parent_ref: str | None) -> dict
|
||||
error_message="Authentication failed. Re-connect the account.",
|
||||
)
|
||||
await session.commit()
|
||||
raise _TerminalProviderError(f"Auth error: {exc}") from exc
|
||||
raise _TerminalProviderError("Authentication failed. Re-connect the account.") from exc
|
||||
# Transient failure — let Celery retry
|
||||
raise _TransientProviderError(f"Provider error: {exc}") from exc
|
||||
raise _TransientProviderError("Provider error. Will retry.") from exc
|
||||
|
||||
# Reconcile listing into durable cloud_items rows
|
||||
await reconcile_cloud_listing(
|
||||
|
||||
Reference in New Issue
Block a user