Skip to content

Commit

Permalink
remove redundant info
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick-prima committed Nov 4, 2024
1 parent d3fa21d commit c9cf847
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lib/avrogen/schema/schema_registry.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand All @@ -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
}
)

Expand Down

0 comments on commit c9cf847

Please sign in to comment.