Skip to content

POST request different behaviour  #1

Open
@BugsBunny33

Description

@BugsBunny33

POST /terms/similarity/

Stack Trace:
INFO: 172.17.0.1:54882 - "GET /terms/similarity HTTP/1.1" 422 Unprocessable Entity
INFO: 172.17.0.1:55000 - "GET /term/HP%3A0000961 HTTP/1.1" 200 OK
INFO: 172.17.0.1:55332 - "POST /terms/similarity/ HTTP/1.1" 422 Unprocessable Entity
INFO: 172.17.0.1:55348 - "POST /terms/similarity/ HTTP/1.1" 422 Unprocessable Entity
INFO: 172.17.0.1:55388 - "POST /terms/similarity/ HTTP/1.1" 200 OK
INFO: 172.17.0.1:55400 - "POST /terms/similarity/ HTTP/1.1" 200 OK
INFO: 172.17.0.1:55490 - "POST /terms/similarity/ HTTP/1.1" 200 OK
INFO: 172.17.0.1:56422 - "GET /term/HP%3A0001635/neighbours?verbose=false HTTP/1.1" 200 OK
INFO: 172.17.0.1:56422 - "GET /term/HP%3A0001635?verbose=false HTTP/1.1" 200 OK
INFO: 172.17.0.1:56432 - "POST /terms/similarity/ HTTP/1.1" 500 Internal Server Error
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/uvicorn/protocols/http/h11_impl.py", line 389, in run_asgi
result = await app(self.scope, self.receive, self.send)
File "/usr/local/lib/python3.6/site-packages/uvicorn/middleware/proxy_headers.py", line 45, in call
return await self.app(scope, receive, send)
File "/usr/local/lib/python3.6/site-packages/fastapi/applications.py", line 181, in call
await super().call(scope, receive, send) # pragma: no cover
File "/usr/local/lib/python3.6/site-packages/starlette/applications.py", line 111, in call
await self.middleware_stack(scope, receive, send)
File "/usr/local/lib/python3.6/site-packages/starlette/middleware/errors.py", line 181, in call
raise exc from None
File "/usr/local/lib/python3.6/site-packages/starlette/middleware/errors.py", line 159, in call
await self.app(scope, receive, _send)
File "/usr/local/lib/python3.6/site-packages/starlette/middleware/cors.py", line 78, in call
await self.app(scope, receive, send)
File "/usr/local/lib/python3.6/site-packages/starlette/exceptions.py", line 82, in call
raise exc from None
File "/usr/local/lib/python3.6/site-packages/starlette/exceptions.py", line 71, in call
await self.app(scope, receive, sender)
File "/usr/local/lib/python3.6/site-packages/starlette/routing.py", line 566, in call
await route.handle(scope, receive, send)
File "/usr/local/lib/python3.6/site-packages/starlette/routing.py", line 227, in handle
await self.app(scope, receive, send)
File "/usr/local/lib/python3.6/site-packages/starlette/routing.py", line 41, in app
response = await func(request)
File "/usr/local/lib/python3.6/site-packages/fastapi/routing.py", line 183, in app
dependant=dependant, values=values, is_coroutine=is_coroutine
File "/usr/local/lib/python3.6/site-packages/fastapi/routing.py", line 133, in run_endpoint_function
return await dependant.call(**values)
File "/usr/local/lib/python3.6/site-packages/pyhpoapi/routers/terms.py", line 377, in batch_similarity
res['error'] = ex.headers['X-TermNotFound']
TypeError: 'NoneType' object is not subscriptable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions