Skip to content

Enhance Security Configuration Error Handling introducing Userfacing error utils

Jannik Lehmann requested to merge jnnkl-errorhandling-empty-repo-sast into master

What does this MR do and why?

This MR is meant to solve: #386854 (closed)

It enhances the error-handling for the Sast configuration page and the security & compliance Configuration page to show a specific error-message when given a Userfacing error message from the Backend and a generic error-message when not given a userfacing Error message from the Backend.

To achieve this behaviour this MR introduces a Frontend- and a Backend-Util to make user-facing and non-user-facing Error messages distinguishable by adding and parsing a prefix.

Screenshots or screen recordings

SAST Configuration

before after
Screenshot_2023-02-16_at_14.50.29 Screenshot_2023-02-16_at_14.50.09

Security & Compliance Configuration

No visual changes.

How to set up and validate locally

  1. create an empty repository (not even a readme-file)
  2. go to Security & Compliance-> Configuration-> Enable Depedency Scanning with a MR (See error alert in action)
  3. go to Security & Compliance-> Configuration-> Configure SAST (See error alert in action)

MR acceptance checklist

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

Edited by Jannik Lehmann

Merge request reports