buildConciseErrorMessage

fun buildConciseErrorMessage(raw: String): String

Builds a concise error message from an error JSON string.

Example input: { "code":"NotFound", "message":"Validation Error", "details":{"location":"params","msg":"Resource Not Found","param":"sessionId","value":"d91f..."} }

Output: "sessionId, Resource Not Found"

If no param present, only the message is returned. If JSON invalid, raw string is returned unchanged.