Structured error returned by the QuackDB client.
@type code() :: atom()
@type source() :: :client | :server | :transport | :protocol
@type t() :: %QuackDB.Error{ __exception__: true, code: code(), connection_id: String.t() | nil, message: String.t(), metadata: map(), query: iodata() | nil, retriable?: boolean(), source: source() }
@spec new(code(), String.t(), Keyword.t()) :: t()