@@ -143,15 +143,16 @@ def _pop_http_request(self, invoc_id):
143
143
context_ref .http_request = None
144
144
return request
145
145
146
- raise Exception (f"No http request found for invocation { invoc_id } " )
146
+ raise ValueError (f"No http request found for invocation { invoc_id } " )
147
147
148
148
def _pop_http_response (self , invoc_id ):
149
149
context_ref = self ._context_references .get (invoc_id )
150
150
response = context_ref .http_response
151
151
if response is not None :
152
152
context_ref .http_response = None
153
153
return response
154
- raise Exception (f"No http response found for invocation { invoc_id } " )
154
+
155
+ raise ValueError (f"No http response found for invocation { invoc_id } " )
155
156
156
157
157
158
def get_unused_tcp_port ():
@@ -184,12 +185,12 @@ async def catch_all(request: request_type): # type: ignore
184
185
invoc_id = request .headers .get (X_MS_INVOCATION_ID )
185
186
if invoc_id is None :
186
187
raise ValueError (f"Header { X_MS_INVOCATION_ID } not found" )
187
- logger .info (f 'Received HTTP request for invocation { invoc_id } ' )
188
+ logger .info ('Received HTTP request for invocation %s' , invoc_id )
188
189
http_coordinator .set_http_request (invoc_id , request )
189
190
http_resp = \
190
191
await http_coordinator .await_http_response_async (invoc_id )
191
192
192
- logger .info (f 'Sending HTTP response for invocation { invoc_id } ' )
193
+ logger .info ('Sending HTTP response for invocation %s' , invoc_id )
193
194
# if http_resp is an python exception, raise it
194
195
if isinstance (http_resp , Exception ):
195
196
raise http_resp
@@ -203,7 +204,7 @@ async def catch_all(request: request_type): # type: ignore
203
204
loop .create_task (web_server_run_task )
204
205
205
206
web_server_address = f"http://{ host_addr } :{ unused_port } "
206
- logger .info (f 'HTTP server starting on { web_server_address } ' )
207
+ logger .info ('HTTP server starting on %s' , web_server_address )
207
208
208
209
return web_server_address
209
210
@@ -224,7 +225,7 @@ class HttpV2Registry:
224
225
_http_v2_enabled_checked = False
225
226
226
227
@classmethod
227
- def http_v2_enabled (cls , functions = None , ** kwargs ):
228
+ def http_v2_enabled (cls , ** kwargs ):
228
229
# Check if HTTP/2 enablement has already been checked
229
230
if not cls ._http_v2_enabled_checked :
230
231
# If not checked yet, mark as checked
0 commit comments