def parse_exception(e)
      msg = e.to_s
      json = msg.to_s.sub(/^Couldn't find id: /, '').split("\n").map(&:chomp)
      json.map { |str| JSON.parse(str) }
    rescue JSON::ParserError
      raise e
    end
def parse_exception(e)
      msg = e.to_s
      json = msg.to_s.sub(/^Couldn't find id: /, '').split("\n").map(&:chomp)
      json.map { |str| JSON.parse(str) }
    rescue JSON::ParserError
      raise e
    end
Parses the exception JSON message.

 The message must be a list of JSON messages merged by a new line.

 A valid exception message example:

 ```
 {"stream":"Step 1 : FROM alpine:3.2\n"}
 {"stream":" ---\u003e d6ead20d5571\n"}
 {"stream":"Step 2 : RUN apk add --update wrong-package-name\n"}
 {"stream":" ---\u003e Running in 290a46fa8bf4\n"}
 {"stream":"fetch http://dl-4.alpinelinux.org/alpine/v3.2/main/...\n"}
 {"stream":"ERROR: unsatisfiable constraints:\n"}
 {"stream":"  wrong-package-name (missing):\n    required by: world...\n"}
 {"errorDetail":{"message":"The command ..."},"error":"The command ..."}
 ```

 @example
   self.parse_exception(e)
   #=> [{ "stream" => "Step 1 : FROM alpine:3.2\n" }, "errorDetail" => ...

 @param e [Exception] The exception object to parse.

 @return [Array<Hash>] The list of JSON messages parsed.

 @return

 @api private