mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-10-27 20:41:01 +00:00
- Some endpoints (`/api/v1/repos/*/*/raw`, `/api/v1/repos/*/*/media`, ...; anything that uses both `context.ReferencesGitRepo()` and `context.RepoRefForAPI` really) returned a 500 when the repository was completely empty. This resulted in some confusion in https://github.com/datalad/datalad-usage-dashboard/issues/47 because the same request for a non-existent file in a repository could sometimes generate a 404 and sometimes a 500, depending on if the git repository is initialized at all or not. Returning a 404 is more appropriate here, since this isn't an unexpected internal error, but just another way of not finding the requested data. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7003 Reviewed-by: Gusted <gusted@noreply.codeberg.org> Co-authored-by: Matthias Riße <m.risse@fz-juelich.de> Co-committed-by: Matthias Riße <m.risse@fz-juelich.de> |
||
|---|---|---|
| .. | ||
| upload | ||
| access_log.go | ||
| api.go | ||
| api_org.go | ||
| api_test.go | ||
| base.go | ||
| base_test.go | ||
| captcha.go | ||
| context.go | ||
| context_cookie.go | ||
| context_model.go | ||
| context_request.go | ||
| context_response.go | ||
| context_template.go | ||
| context_test.go | ||
| csrf.go | ||
| org.go | ||
| package.go | ||
| pagination.go | ||
| permission.go | ||
| private.go | ||
| quota.go | ||
| repo.go | ||
| repository.go | ||
| response.go | ||
| user.go | ||
| utils.go | ||
| xsrf.go | ||
| xsrf_test.go | ||