Skip to content

Use more friendly error message when a repository can not be accessed #18225

Closed
@wxiaoguang

Description

@wxiaoguang

Now, if users access an invalid repository (non-existing, renamed, etc), they would see:

$ git fetch
Gitea: Internal Server Error
Gitea: Internal Server Error
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

The Internal Server Error is quite misleading and there is a error level message in Gitea log:

...ters/private/serv.go:114:ServCommand() [E] Unable to get repository owner: org-name/repo-name Error: user does not exist [uid: 0, name: org-name, keyid: 0]

Since such case is not an serious error, users should not see the Internal Server Error or the error level log messages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/enhancementAn improvement of existing functionality

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions