Skip to content

Submitting a "Close" review returns a 500 #347

Description

@pieer

Problem

The "Submit Review" modal offers a Close option, but the review type has no server-side counterpart: SubmitReviewForm.ReviewType() (services/forms/repo_form.go:598) has no "close" case, so it maps to ReviewTypeUnknown and SubmitReview falls through to ctx.ServerError — an HTTP 500.

Found while fixing #205. That PR (#342) turned the 500 into a clean 403 for users who are not allowed to pick Close, but the users who are allowed to pick it — the article owner and the change-request author — still get a 500.

Solution

Implement the close review type end-to-end, or remove the option from the modal if closing a change request is meant to happen through a different control. Either way, no user who can see the option should be able to trigger a 500 with it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions