Fix HTTPException not callable error in action_execution_server middleware (#7215)

Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
Robert Brennan 2025-03-12 15:10:13 -04:00 committed by GitHub
parent 38e866cde4
commit 7084b0238c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -546,7 +546,9 @@ if __name__ == '__main__':
try:
verify_api_key(request.headers.get('X-Session-API-Key'))
except HTTPException as e:
return e
return JSONResponse(
status_code=e.status_code, content={'detail': e.detail}
)
response = await call_next(request)
return response