Skip to content

Ensure errors in `ProjectSubscriptions::Create use secure method

What does this MR do and why?

It changes the Create mutation for the project subscription in order to use a safe method for returning the errors

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

  1. Start up the branch and open the graphql explorer
  2. Run queries that trigger errors, you can run a query that succeeds at first and then run it again for it to fail

Example query:

mutation {
  createProjectSubscription(input: {
    projectPath: "toolbox/gitlab-smoke-tests",
    upstreamPath: "Commit451/test-3-pub"
  } ) {
    subscription {
      id
    }
    errors
  }
}

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #429613 (closed)

Merge request reports