Geofox. Utils. ErrorHandler
(geofox_ex v0.1.1)
View Source
Error handling utilities for Geofox API responses.
Summary
Functions
Check an API response for error codes and return a normalized result.
Extract data from a successful API response, raising on errors.
Handle Tesla/HTTP client responses (used internally by Client module).
Functions
Check an API response for error codes and return a normalized result.
Examples
{:ok, data} = response |> Geofox.Utils.ErrorHandler.check_response()
{:error, reason} = response |> Geofox.Utils.ErrorHandler.check_response()
Extract data from a successful API response, raising on errors.
Useful for pipeline operations where you want to fail fast on API errors.
Handle Tesla/HTTP client responses (used internally by Client module).