class ChefCLI::ServiceExceptionInspectors::HTTP

def attempt_error_message_extract

def attempt_error_message_extract
  error_body = FFI_Yajl::Parser.parse(response_body)
  if error_body.respond_to?(:key?) && error_body.key?("error")
    Array(error_body["error"]).join(", ")
  else
    error_body.to_s
  end
rescue
  response_body
end