Errors#
Custom exception classes for the Ionworks API client.
Custom exception classes for the Ionworks API client.
This module defines IonworksError, which is raised when API requests
fail or return error responses.
- exception ionworks.errors.IonworksError(message, status_code=None)[source]#
Bases:
ExceptionCustom exception for Ionworks API errors.
- data#
Structured error data if available (e.g., from API error response).
- exception ionworks.errors.MeasurementProcessingError(message, failures=None)[source]#
Bases:
IonworksErrorRaised when a measurement upload could not be processed by the server.
Uploading a
time_seriesmeasurement is a two-part operation: the request that creates the record returns as soon as the file is stored, and the steps are derived afterwards on the server. A file the server cannot read — a missing or unreadable Step column, say — is therefore rejected after the create call has already returned successfully.The upload methods wait for that second part and raise this rather than returning a measurement that looks created but holds no usable data.
A batch wait is not fail-fast, so one of these can report several measurements at once —
failuresholds every one of them.- failures#
Reason keyed by the id of each measurement whose processing failed. The records exist and can be inspected or deleted; they simply have no steps.