mirror of
https://github.com/anyproto/any-sync.git
synced 2025-06-08 14:07:02 +09:00
Fix for deleted storages
This commit is contained in:
parent
b103f553e5
commit
497a467768
1 changed files with 3 additions and 0 deletions
|
@ -158,6 +158,9 @@ func NewStorage(ctx context.Context, id string, headStorage headstorage.HeadStor
|
||||||
st.arena = &anyenc.Arena{}
|
st.arena = &anyenc.Arena{}
|
||||||
st.root, err = st.Get(ctx, st.id)
|
st.root, err = st.Get(ctx, st.id)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if errors.Is(err, anystore.ErrDocNotFound) {
|
||||||
|
return nil, treestorage.ErrUnknownTreeId
|
||||||
|
}
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return st, nil
|
return st, nil
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue