A failed Polar API call.
Every operation returns {:error, %Polarex.Error{}} on failure:
status- the HTTP status, ornilfor transport errorsmessage- a human-readable descriptionvalidation_errors- decodedPolarex.ValidationErrorstructs on 422sbody- the raw decoded response body, if anyreason- the transport error reason, when the request never got a response
It is an exception, so it can also be raised directly.
Summary
Types
@type t() :: %Polarex.Error{ __exception__: true, body: term(), message: String.t(), reason: term(), status: integer() | nil, validation_errors: [Polarex.ValidationError.t()] }