Parser to parse all the responses from Auth0 API endpoints.
Req decodes JSON response bodies automatically, so a successful response carries an already-decoded term. Bodies that are not JSON — an HTML error page, say — are passed through as the raw binary Req produced.
Every failure becomes an Auth0Client.Error, which carries the response headers so
callers can honour Retry-After on a 429.
Summary
Functions
Parses the response from auth0 api calls
Types
@type response() :: {:ok, body()} | :ok | {:error, Auth0Client.Error.t()}
@type status_code() :: non_neg_integer()
Functions
@spec parse({:ok, Req.Response.t()} | {:error, Exception.t()}) :: response()
Parses the response from auth0 api calls