Improve UX for displayed CODEOWNERS errors (Frontend)
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
This is the frontend component to #517967
It will be beneficial for a better UX that we display extra information for some type of errors i.e INVALID_SECTION_OWNER_FORMAT: Inaccessible owners
, MALFORMED_ENTRY_OWNER: Malformed owners
and OWNER_WITHOUT_PERMISSION: Owners without permission
.
NB: There may be other errors here that may benefit from this
Proposal
We could enhance error reporting by extending Gitlab::CodeOwners::Error
to return details about a line entry error. Adding a details
field to that class (i.e., Error.new(message: :malformed_entry_owner, line_number: 5, path: path, details: malformed_owner)
) would allow us to display more informative messages to the Frontend i.e Line 5: malformed_owner
.