# `BadBooleanError` [ð](https://github.com/elixir-lang/elixir/blob/v1.20.1/lib/elixir/lib/exception.ex#L1483) An exception raised when a boolean is expected, but something else was given. This exception is raised by `and` and `or` when the first argument is not a boolean: iex> 123 and true ** (BadBooleanError) expected a boolean on left-side of "and", got: ... --- *Consult [api-reference.md](api-reference.md) for complete listing*