Draft: fix: format error message as json when using -f json

Description

  • Change the format of the error message in json format
  • Clean the error message and format it before passing to the user

Resolves #[#8138]

How has this been tested?

  • Test cases have been updated for the get command of the glab

Screenshots (if appropriate):

Screenshot_2026-02-02_at_1.28.29_PM

Edited by Aayush

Merge request reports

Loading