diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 2aca35a..d04f223 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.5.0" + ".": "0.5.1" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 8817edb..e3249ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.5.1 (2025-10-16) + +Full Changelog: [v0.5.0...v0.5.1](https://github.com/fashn-AI/fashn-python-sdk/compare/v0.5.0...v0.5.1) + +### Bug Fixes + +* add error details to time_out ([5f35072](https://github.com/fashn-AI/fashn-python-sdk/commit/5f35072dc703907f5a8cebf82b2391e9d0b2f132)) + ## 0.5.0 (2025-10-15) Full Changelog: [v0.4.0...v0.5.0](https://github.com/fashn-AI/fashn-python-sdk/compare/v0.4.0...v0.5.0) diff --git a/pyproject.toml b/pyproject.toml index 208dd0a..2190664 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "fashn" -version = "0.5.0" +version = "0.5.1" description = "The official Python library for the fashn API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/fashn/_version.py b/src/fashn/_version.py index 54b970f..7f62595 100644 --- a/src/fashn/_version.py +++ b/src/fashn/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "fashn" -__version__ = "0.5.0" # x-release-please-version +__version__ = "0.5.1" # x-release-please-version diff --git a/src/fashn/resources/predictions.py b/src/fashn/resources/predictions.py index 09d8448..d11408c 100644 --- a/src/fashn/resources/predictions.py +++ b/src/fashn/resources/predictions.py @@ -22,7 +22,7 @@ from .._constants import DEFAULT_MAX_RETRIES from .._base_client import make_request_options from ..types.prediction_run_response import PredictionRunResponse -from ..types.prediction_status_response import PredictionStatusResponse +from ..types.prediction_status_response import Error, PredictionStatusResponse from ..types.prediction_subscribe_params import ( EnqueuedCallback, QueueUpdateCallback, @@ -347,7 +347,10 @@ def _poll_status( timeout_status_for_callback = PredictionStatusResponse( id=prediction_id, status="time_out", - error=None, + error=Error( + name="PollingTimeout", + message="Prediction polling timed out.", + ), output=None, ) if on_queue_update: @@ -355,7 +358,10 @@ def _poll_status( return PredictionSubscribeResponse( id=prediction_id, status="time_out", - error=None, + error=Error( + name="PollingTimeout", + message="Prediction polling timed out.", + ), output=None, ) @@ -1256,7 +1262,10 @@ async def _poll_status( timeout_status_for_callback = PredictionStatusResponse( id=prediction_id, status="time_out", - error=None, + error=Error( + name="PollingTimeout", + message="Prediction polling timed out.", + ), output=None, ) if on_queue_update: @@ -1264,7 +1273,10 @@ async def _poll_status( return PredictionSubscribeResponse( id=prediction_id, status="time_out", - error=None, + error=Error( + name="PollingTimeout", + message="Prediction polling timed out.", + ), output=None, ) diff --git a/src/fashn/types/prediction_status_response.py b/src/fashn/types/prediction_status_response.py index 1c3d3de..8649dad 100644 --- a/src/fashn/types/prediction_status_response.py +++ b/src/fashn/types/prediction_status_response.py @@ -22,6 +22,7 @@ class Error(BaseModel): "ThirdPartyError", "3rdPartyProviderError", "InternalServerError", + "PollingTimeout", ] """Error type/category with troubleshooting guidance: @@ -91,6 +92,11 @@ class Error(BaseModel): - _Cause_: Unexpected server-side failure - _Solution_: Retry request. Contact support@fashn.ai with prediction ID if persists + + **PollingTimeout** - Request timed out (fallback error type) + + - _Cause_: Request timed out before completion + - _Solution_: Retry request or increase the timeout parameter """