From c9cf847c447b95089569f1a0c34c0d502a983efc Mon Sep 17 00:00:00 2001 From: Patrick Tschorn Date: Mon, 4 Nov 2024 15:37:08 +0000 Subject: [PATCH] remove redundant info --- lib/avrogen/schema/schema_registry.ex | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/avrogen/schema/schema_registry.ex b/lib/avrogen/schema/schema_registry.ex index ebf0024..7e90eee 100644 --- a/lib/avrogen/schema/schema_registry.ex +++ b/lib/avrogen/schema/schema_registry.ex @@ -40,9 +40,8 @@ defmodule Avrogen.Schema.SchemaRegistry do end) |> Avrogen.Schema.topological_sort() |> Noether.Either.map(fn schemas -> - json = Jason.encode!(schemas) - try do + json = Jason.encode!(schemas) encoder = make_encoder(json) decoder = make_decoder(json) :ets.insert(__MODULE__, {@ets_name, json, encoder, decoder}) @@ -51,11 +50,10 @@ defmodule Avrogen.Schema.SchemaRegistry do formatted_error = Exception.format(:error, e, __STACKTRACE__) Logger.error( - "Error when attempting to make encoder/decoder: #{formatted_error}; schemas: #{inspect(schemas, limit: :infinity, pretty: true, printable_limit: :infinity)} schemas_json: #{json}", + "Error when attempting to make encoder/decoder: #{formatted_error}; schemas: #{inspect(schemas, limit: :infinity, pretty: true, printable_limit: :infinity)}", %{ error: formatted_error, - schemas: schemas, - schemas_json: json + schemas: schemas } )