An invalid regex in commit author push rule results in 'API is not accessible' error

Zendesk: https://gitlab.zendesk.com/agent/tickets/76662

If a user specifies an invalid regex in a push rule, an attempt to push or commit will yield an 'API is not accessible' error. The error should be specific and say the regex is invalid. I'm guessing the issue is we don't catch an error somewhere so fails with the generic error.

An easy example of an invalid regex is one where parentheses don't match up.

Assignee Loading
Time tracking Loading