Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions openviking/storage/viking_fs.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
from pathlib import PurePath
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union

from openviking.pyagfs.exceptions import AGFSClientError, AGFSHTTPError
from openviking.server.identity import RequestContext, Role
from openviking.telemetry import get_current_telemetry
from openviking.utils.time_utils import format_simplified, get_current_timestamp, parse_iso_datetime
Expand Down Expand Up @@ -1667,8 +1668,11 @@ async def append_file(
existing_bytes = self._handle_agfs_read(self.agfs.read(path))
existing_bytes = await self._decrypt_content(existing_bytes, ctx=ctx)
existing = self._decode_bytes(existing_bytes)
except Exception:
pass
except AGFSHTTPError as e:
if e.status_code != 404:
raise
except AGFSClientError:
raise

await self._ensure_parent_dirs(path)
final_content = (existing + content).encode("utf-8")
Expand Down