ShazamKit.Error exception (shazam_kit v0.2.0)

Copy Markdown View Source

Structured exception for ShazamKit API failures.

Summary

Functions

Create an error from an HTTP response.

Check if the error indicates no match was found.

Types

t()

@type t() :: %ShazamKit.Error{
  __exception__: true,
  details: map() | nil,
  message: String.t(),
  status: integer() | nil
}

Functions

from_http(status, body)

@spec from_http(integer(), binary() | map() | nil) :: t()

Create an error from an HTTP response.

no_match?(arg1)

@spec no_match?(t()) :: boolean()

Check if the error indicates no match was found.