[NETCONF-807] Pretty-print error messages Created: 16/Aug/21  Updated: 10/Sep/21  Resolved: 10/Sep/21

Status: Resolved
Project: netconf
Component/s: restconf-nb
Affects Version/s: None
Fix Version/s: 2.0.4

Type: Improvement Priority: Medium
Reporter: Robert Varga Assignee: Dominik Vrbovský
Resolution: Done Votes: 0
Labels: pt
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

When we are formatting out error reports we tack them into a single line, which renders them a bit user-unfriendly:

{"errors":{"error":[{"error-tag":"malformed-message","error-info":"Failed to lookup prefix ","error-message":"Error parsing json input: Failed to lookup prefix ","error-type":"protocol"}]}}

Update the implementation so that it looks something like this:

{
   "errors" : {
      "error" : [
         {
            "error-type" : "protocol",
            "error-tag" : "malformed-message",
            "error-info" : "Failed to lookup prefix ",
            "error-message" : "Error parsing json input: Failed to lookup prefix "
         }
      ]
   }
}

Generated at Wed Feb 07 20:15:57 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.