Skip to content

Commit

Permalink
put detail into error message so that it will show up in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick-prima committed Nov 1, 2024
1 parent 07503d7 commit 5bc28a0
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions lib/avrogen/schema/schema_registry.ex
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,16 @@ defmodule Avrogen.Schema.SchemaRegistry do
rescue
e ->
formatted_error = Exception.format(:error, e, __STACKTRACE__)

Logger.error("Error when attempting to make encoder/decoder: #{formatted_error}", %{
error: formatted_error,
schemas: schemas,
schemas_json: Jason.encode(schemas)
})
json = Jason.encode(schemas) |> elem(1)

Logger.error(
"Error when attempting to make encoder/decoder: #{formatted_error}; schemas: #{inspect(schemas)} schemas_json: #{json}",
%{
error: formatted_error,
schemas: schemas,
schemas_json: json
}
)

reraise e, __STACKTRACE__
end
Expand Down

0 comments on commit 5bc28a0

Please sign in to comment.