Document-service: File upload error
[2021-07-16T11:46:01.510Z] | aiohttp.access | INFO - "94.45.158.37 PUT /api/documents/public HTTP/1.1 500 244 - GuzzleHttp/6.5.5 curl/7.68.0 PHP/7.4.16 0.262000 " | X-Request-ID: 71ea27ba49b700a64bf11e9970659228
Could we add more details to this exception? If its storage-related problem - can we add useful message on it?
[2021-07-16T11:46:01.509Z] | aiohttp.server | ERROR - Error handling request | X-Request-ID: 71ea27ba49b700a64bf11e9970659228
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
resp = await self._request_handler(request)
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 499, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 118, in impl
return await handler(request)
File "/document_service/prozorro_sale/document_service/utils.py", line 24, in excepts_errors_middleware
return await handler(request)
File "/usr/local/lib/python3.9/site-packages/prozorro_sale/auth/__init__.py", line 107, in context_middleware
return await handler(request)
File "/usr/local/lib/python3.9/site-packages/prozorro_sale/tools/logging.py", line 96, in request_id_middleware
response = await handler(request)
File "/usr/local/lib/python3.9/site-packages/prozorro_sale/auth/__init__.py", line 123, in handler
return await func(request, *args, **kwargs)
File "/document_service/prozorro_sale/document_service/api.py", line 52, in upload_document
document_data = await request.app.storage.upload(data, scope, doc_type)
File "/document_service/prozorro_sale/document_service/storages/swift_storage.py", line 172, in upload
raise ERRORS.get(response.status, Exception)
Exception
- We have no X-Request-ID in haproxy log of this API call - it seems that the response, in that case, didn't add a proper header, like in other cases.
Raised on prod,8 times on Jul 16