Structured error returned by Rover functions.
Rover.fetch/2 and browser commands return {:error, %Rover.Error{}} on
failure — never raise. Pattern match on :reason to dispatch recovery:
case Rover.fetch(url) do
{:ok, result} ->
handle(result)
{:error, %Rover.Error{reason: :timeout}} ->
Logger.warning("slow page: #{url}")
:skip
{:error, %Rover.Error{reason: :proxy}} ->
retry_direct(url)
endReason atoms
:timeout— page load exceeded the configured timeout.:navigation— URL could not be reached (DNS, TLS, connection reset).:selector_not_found— a selector expected by the operation did not match.:selector_timeout—wait_forselector did not appear in time.:evaluation— JavaScript evaluation threw.:proxy— proxy connection failed.:invalid_argument— malformed argument (bad URL, unknown option, etc.).:runtime— internal runtime error (NIF / subprocess / wire protocol).:shutdown— runtime is shutting down and refused the request.:port_died— the runtime subprocess exited unexpectedly.
Summary
Functions
Build an error from the runtime's wire representation.