@@ -818,7 +818,7 @@ async def add_webhook(
818
818
ignore_ssl_errors : bool | None = None ,
819
819
do_not_retry : bool | None = None ,
820
820
idempotency_key : str | None = None ,
821
- ) -> dict | None :
821
+ ) -> None :
822
822
"""Create an ad-hoc webhook for the current Actor run.
823
823
824
824
This webhook lets you receive a notification when the Actor run finished or failed.
@@ -842,13 +842,13 @@ async def add_webhook(
842
842
843
843
if not self .is_at_home ():
844
844
self .log .error ('Actor.add_webhook() is only supported when running on the Apify platform.' )
845
- return None
845
+ return
846
846
847
847
# If is_at_home() is True, config.actor_run_id is always set
848
848
if not self ._configuration .actor_run_id :
849
849
raise RuntimeError ('actor_run_id cannot be None when running on the Apify platform.' )
850
850
851
- return await self ._apify_client .webhooks ().create (
851
+ await self ._apify_client .webhooks ().create (
852
852
actor_run_id = self ._configuration .actor_run_id ,
853
853
event_types = webhook .event_types ,
854
854
request_url = webhook .request_url ,
@@ -863,7 +863,7 @@ async def set_status_message(
863
863
status_message : str ,
864
864
* ,
865
865
is_terminal : bool | None = None ,
866
- ) -> dict | None :
866
+ ) -> ActorRun | None :
867
867
"""Set the status message for the current Actor run.
868
868
869
869
Args:
@@ -884,8 +884,10 @@ async def set_status_message(
884
884
if not self ._configuration .actor_run_id :
885
885
raise RuntimeError ('actor_run_id cannot be None when running on the Apify platform.' )
886
886
887
- return await self ._apify_client .run (self ._configuration .actor_run_id ).update (
888
- status_message = status_message , is_status_message_terminal = is_terminal
887
+ return ActorRun .model_validate (
888
+ await self ._apify_client .run (self ._configuration .actor_run_id ).update (
889
+ status_message = status_message , is_status_message_terminal = is_terminal
890
+ )
889
891
)
890
892
891
893
async def create_proxy_configuration (
0 commit comments