Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[API] notifcations API returns 500 if comment was deleted #17499

Closed
qwerty287 opened this issue Oct 31, 2021 · 1 comment · Fixed by #17550
Closed

[API] notifcations API returns 500 if comment was deleted #17499

qwerty287 opened this issue Oct 31, 2021 · 1 comment · Fixed by #17550
Labels
Milestone

Comments

@qwerty287
Copy link
Contributor

qwerty287 commented Oct 31, 2021

Gitea Version

1.16.0

How are you running Gitea?

built from source, from cli

Can you reproduce the bug on the Gitea demo site?

Yes

Description

The notifications API (api/v1/notifications) returns a 500 internal server error if any notification addresses a comment that was deleted.
...pi/v1/notify/user.go:85:ListNotifications() [E] InternalServerError: GetCommentByID [193] for issue ID [53]: comment does not exist [id: 193, issue_id: 0]

@zeripath
Copy link
Contributor

OK so the problem here is that NotificationList.LoadAttributes() is not fault tolerant and will return whenever there is an error.

@lunny lunny added the type/bug label Nov 2, 2021
@lunny lunny added this to the 1.15.7 milestone Nov 2, 2021
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants