Actions
Issue #4321
closed500 error when content path does not exist
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:
Description
I am running the content app:
gunicorn pulpcore.content:server --bind 'localhost:8080' --worker-class 'aiohttp.GunicornWebWorker' -w 2 >> ~/content_app.log
When I try to curl a path that does not exist:
$ http GET http://localhost:8080/pulp/content/this/path/doesn/not/exist
HTTP/1.1 500 Internal Server Error
Connection: close
Content-Length: 141
Content-Type: text/html; charset=utf-8
Date: Mon, 14 Jan 2019 21:02:29 GMT
Server: Python/3.6 aiohttp/3.4.4
<html><head><title>500 Internal Server Error</title></head><body><h1>500 Internal Server Error</h1>Server got itself in trouble</body></html>
The gunicorn stacktrace:
Traceback (most recent call last):
File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/aiohttp/web_protocol.py", line 390, in start
resp = await self._request_handler(request)
File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/aiohttp/web_app.py", line 366, in _handle
resp = await handler(request)
File "/home/vagrant/devel/pulp/pulpcore/content/handler.py", line 61, in stream_content
return await self._match_and_stream(path, request)
File "/home/vagrant/devel/pulp/pulpcore/content/handler.py", line 156, in _match_and_stream
distribution = Handler._match_distribution(path)
File "/home/vagrant/devel/pulp/pulpcore/content/handler.py", line 105, in _match_distribution
raise PathNotResolved(path)
pulpcore.content.handler.PathNotResolved: this/path/doesn/not/exist
Related issues
Actions