Follow-up from "API to enable and disable error tracking settings"

The following discussions from !24220 (merged) should be addressed:

  • @splattael started a discussion:

    If allow_blank is missing we'll get a ActiveRecord::NotNullViolation:

    `` ActiveRecord::NotNullViolation (PG::NotNullViolation: ERROR: null value in column "enabled" violates not-null constraint DETAIL: Failing row contains (21, null, http://127.0.0.1:9000/api/0/projects/sentry/gitlab/, 9CHYU82EK26F2MobAWU3FYS0AhV/dxOFeNHYREjm3w3K6KDxJJH6W4EVluto D95..., KvvOqG4Bwb48C944 , gitlab, Sentry)

    
    See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/24220#note_282818056
    
    This indicates that we should validate `enabled` in the `ErrorTracking::ProjectErrorTrackingSetting`. See [`GranfaIntegration`](https://gitlab.com/gitlab-org/gitlab/-/blob/5f6d1b6fb3801a743e4da0b7795a4e237e392ea6/app/models/grafana_integration.rb#L19).
    
    We can fix this in a follow-up MR :+1:
  • @splattael started a discussion:

    In order to make use of subject we have to define it in e.g !24220 (diffs) so we mixing both make_request/make_patch_request and subject. This we could unify by

    • Rename make_patch_request(active:) to match_request (no params)
    • Introduce let(:params) { ... } to the PATCH specs and use params in newly renamed make_request
    • Replace the usage of subject with make_request

    Again, nothing critical and perfect for a follow-up 👍

  • @splattael started a discussion:

    We could use let_it_be here