class Octokit::Error

def self.error_for_422(body)

Other tags:
    Private: -
def self.error_for_422(body)
  # rubocop:enable Naming/VariableNumber
  if body =~ /PullRequestReviewComment/i && body =~ /(commit_id|end_commit_oid) is not part of the pull request/i
    Octokit::CommitIsNotPartOfPullRequest
  elsif body =~ /Path diff too large/i
    Octokit::PathDiffTooLarge
  else
    Octokit::UnprocessableEntity
  end
end