500 error in API
ERROR:errors:Unknown error caught in API - 'fizz' is not a valid ObjectId, it must be a 12-byte input or a 24-character hex string
Traceback (most recent call last):
File "/procedure/prozorro_sale/procedure/errors.py", line 60, in request_errors_middleware
return await handler(request)
File "/procedure/prozorro_sale/procedure/auth.py", line 35, in token_middleware
return await handler(request)
File "/procedure/prozorro_sale/procedure/auth.py", line 41, in accept_language_middleware
return await handler(request)
File "/procedure/prozorro_sale/procedure/auth.py", line 51, in request_type_middleware
return await handler(request)
File "/procedure/prozorro_sale/procedure/auth.py", line 57, in request_context_middleware
return await handler(request)
File "/procedure/prozorro_sale/procedure/api.py", line 106, in get_procedure
procedure = await db.read_procedure(procedure_id)
File "/procedure/prozorro_sale/procedure/db.py", line 60, in read_procedure
_id = ObjectId(procedure_id)
File "/usr/local/lib/python3.7/site-packages/bson/objectid.py", line 110, in __init__
self.__validate(oid)
File "/usr/local/lib/python3.7/site-packages/bson/objectid.py", line 213, in __validate
_raise_invalid_id(oid)
File "/usr/local/lib/python3.7/site-packages/bson/objectid.py", line 40, in _raise_invalid_id
" or a 24-character hex string" % oid)
bson.errors.InvalidId: 'fizz' is not a valid ObjectId, it must be a 12-byte input or a 24-character hex string
INFO:aiohttp.access:10.244.0.1 [10/Oct/2019:08:54:18 +0000] "GET /api/procedures/fizz HTTP/1.1" 500 212 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6)
Edited by Ghost User