Skip to content

Commit 1afdbbd

Browse files
committed
Remove httpx exception checks in test package
We've moved away from the built-in test server in favor of pushing users towards using the CLI. The CLI sets environment variables, so there's no chance of user error which is what these messages were designed to help with. Eliminating the httpx dependency means we can adapt the test package to other web frameworks/clients.
1 parent 1eb3b5c commit 1afdbbd

File tree

2 files changed

+0
-13
lines changed

2 files changed

+0
-13
lines changed

src/dispatch/test/client.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
from typing import Mapping, Optional, Protocol, Union
33

44
import grpc
5-
import httpx
65

76
from dispatch.sdk.v1 import function_pb2 as function_pb
87
from dispatch.sdk.v1 import function_pb2_grpc as function_grpc

src/dispatch/test/service.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
from typing import Dict, List, Optional, Set, Tuple
99

1010
import grpc
11-
import httpx
1211
from typing_extensions import TypeAlias
1312

1413
import dispatch.sdk.v1.call_pb2 as call_pb
@@ -325,17 +324,6 @@ def _dispatch_continuously(self):
325324

326325
try:
327326
self.dispatch_calls()
328-
except httpx.HTTPStatusError as e:
329-
if e.response.status_code == 403:
330-
logger.error(
331-
"error dispatching function call to endpoint (403). Is the endpoint's DISPATCH_VERIFICATION_KEY correct?"
332-
)
333-
else:
334-
logger.exception(e)
335-
except httpx.ConnectError as e:
336-
logger.error(
337-
"error connecting to the endpoint. Is it running and accessible from DISPATCH_ENDPOINT_URL?"
338-
)
339327
except Exception as e:
340328
logger.exception(e)
341329

0 commit comments

Comments
 (0)