InsionInsion
Ruby

Errors

Handle timeouts, API failures, and server errors

begin
  client.delete_a_record(client_id: "post-123")
rescue Insion::Errors::TimeoutError
  # The request did not finish before its timeout.
rescue Insion::Errors::ResponseError => error
  puts error.code
  puts error.message
end

The SDK raises TimeoutError for request timeouts, ResponseError for unexpected non-5xx responses, and more specific subclasses for service and server failures.