Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.5.0"
".": "0.5.1"
}
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/fashn/_version.py
Original file line number Diff line number Diff line change
@@ -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
22 changes: 17 additions & 5 deletions src/fashn/resources/predictions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -347,15 +347,21 @@ 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:
on_queue_update(timeout_status_for_callback)
return PredictionSubscribeResponse(
id=prediction_id,
status="time_out",
error=None,
error=Error(
name="PollingTimeout",
message="Prediction polling timed out.",
),
output=None,
)

Expand Down Expand Up @@ -1256,15 +1262,21 @@ 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:
on_queue_update(timeout_status_for_callback)
return PredictionSubscribeResponse(
id=prediction_id,
status="time_out",
error=None,
error=Error(
name="PollingTimeout",
message="Prediction polling timed out.",
),
output=None,
)

Expand Down
6 changes: 6 additions & 0 deletions src/fashn/types/prediction_status_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class Error(BaseModel):
"ThirdPartyError",
"3rdPartyProviderError",
"InternalServerError",
"PollingTimeout",
]
"""Error type/category with troubleshooting guidance:

Expand Down Expand Up @@ -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
"""


Expand Down