Skip to content

Gitea backend issue when fetching repository tree #467

@joh-ku

Description

@joh-ku

Using Gitea backend I'm experiencing an issue when fetching the repository tree at https://gitea.com/api/v1/repos/{owner}/{repo}/git/trees/{sha}.

Sveltia fetches data from the tree split into chunks with 1000 items each. Once the full tree and all chunks are fetched, there is another call to this endpoint where Gitea returns tree: null.

The response body looks like this:

{
"sha":"{sha}",
"url":"https://gitea.com/api/v1/repos/{owner}/{repo}/git/trees/{sha}",
"tree":null,
"truncated":false,
"page":14,
"total_count":12697
}

In this case, when tree is null like above, Sveltia aborts with "There was an error while loading site data. Unexpected error". In the console I see:

can't access property Symbol.iterator, a.tree is null undefined

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions