Skip to content

v0.5.0

Compare
Choose a tag to compare
@mattludwigs mattludwigs released this 25 Sep 17:01

Introduces Grizzly.Command.EncodeError exception and updates encoding and
decoding functions to return tagged tuples. We now use these things when trying
to send a command via Grizzly.send_command/3 so if you have invalid command
arguments we can provide useful error handling with
{:error, Grizzly.Command.EncodeError.t()}. The EncodeError.t() implements
Elixir's exception behaviour so you can leverage the standard library to
work with the exception.

Unless you have implemented custom commands or used one of the many command
encoders or decodes explicitly this update should not affect you too much. If
you have used the encoder/decoders explicitly please see the documentation for
the ones you have used to see the updated API. If you have written a command we
encourage you to validate the arguments and return the {:error, EncodeError.t()}
to improve the usability of and robustness your command. The new
Grizzly.Command.Encoding module provides some useful functionality for
validating specs for command arguments.

  • Enhancements
    • Provide command argument validation and error handling via
      Grizzly.Command.EncodeError.()
    • Update all the command arg encoder/decoder to use tagged
      tuples for better handling of invalid command arguments
    • Introduces new Grizzly.Command.Encoding modules for helping
      validate command arugment specifications
  • Fixes
    • Crashes when providing invalid command arguments