fix: handle missing expected err cases

This commit is contained in:
2025-11-30 20:08:31 +00:00
parent 6c61cbe1fd
commit 3e96c42c4a
3 changed files with 13 additions and 0 deletions

View File

@@ -131,6 +131,9 @@ func (s *Service) CompleteUpload(ctx context.Context, db bun.IDB, accountID uuid
err := s.vfs.WriteFile(ctx, db, upload.TargetNode, virtualfs.FileContentFromBlobKey(upload.TargetNode.BlobKey))
if err != nil {
if errors.Is(err, blob.ErrNotFound) {
return nil, ErrContentNotUploaded
}
return nil, err
}