NoMethodError: undefined method `with_issue_type' for nil:NilClass
This bug is triggered by certain types of automated traffic. It was surfaced while investigating &327 (closed).
We would like to see this resolved because from an Infrastructure viewpoint, HTTP 500 errors make pagers go off. This looks like it should be a 404 instead of a 500.
The problem is that IssuesFinder#by_due_date
doesn't have an else
clause, so if the param is present but not valid, we return nil
.
We should add this to that:
else
Issue.none
Simple test:
$ curl -sI 'https://gitlab.com/groups/gitlab-org/-/issues.ics?due_date=foo' | head -n 1
HTTP/2 500
Related incidents
Edited by Sean McGivern