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.
Problem
The "Submit Review" modal offers a
Closeoption, but the review type has no server-side counterpart:SubmitReviewForm.ReviewType()(services/forms/repo_form.go:598) has no"close"case, so it maps toReviewTypeUnknownandSubmitReviewfalls through toctx.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
closereview 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.