Skip to content

Commit

Permalink
add error code in handling
Browse files Browse the repository at this point in the history
  • Loading branch information
EDsCODE committed Apr 17, 2024
1 parent b2773cb commit dc6e3fd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions posthog/warehouse/api/external_data_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,8 +391,7 @@ def reload(self, request: Request, *args: Any, **kwargs: Any):
try:
trigger_external_data_workflow(schema)
except temporalio.service.RPCError as e:
# schedule doesn't exist
if e.message == "sql: no rows in result set":
if e.status == temporalio.service.RPCStatusCode.NOT_FOUND:
sync_external_data_job_workflow(schema, create=True)

except Exception as e:
Expand Down

0 comments on commit dc6e3fd

Please sign in to comment.