TaxJar.Requests.Error (tax_jar v0.1.1)
Context for representing an error response from the TaxJar API.
Summary
Functions
Build a new Error
struct from the given reason.
Build a new Error
struct from the given JSON response and code.
Types
@type t() :: %TaxJar.Requests.Error{ decoded_response: map() | :none, message: binary() | nil, reason: term(), response: any() | :none, status: non_neg_integer() | :none }
Functions
Link to this function
new(reason)
Build a new Error
struct from the given reason.
This is expected when the connection isn't successful.
Link to this function
new(response, status)
Build a new Error
struct from the given JSON response and code.
It's expected that the response is well formatted JSON.
Link to this function