Skip to content

Fix bag-of-holding log spamming errors on normal operation#4035

Draft
joaoantoniocardoso wants to merge 2 commits into
bluerobotics:masterfrom
joaoantoniocardoso:fix-bag-missing-key
Draft

Fix bag-of-holding log spamming errors on normal operation#4035
joaoantoniocardoso wants to merge 2 commits into
bluerobotics:masterfrom
joaoantoniocardoso:fix-bag-missing-key

Conversation

@joaoantoniocardoso

Copy link
Copy Markdown
Member

Example of spam:

ERROR][5:08:58.496 PM -03][service/bag-of-holding][apis.py:32]: 
KeyError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/pi/libs/commonwealth/src/commonwealth/utils/apis.py", line 30, in custom_route_handler
    return await original_route_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/blueos/venv/lib/python3.11/site-packages/fastapi/routing.py", line 274, in app
    raw_response = await run_endpoint_function(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/blueos/venv/lib/python3.11/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
    return await dependant.call(**values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/services/bag_of_holding/main.py", line 102, in read_data
    raise HTTPException(status_code=400, detail="Invalid path") from KeyError
fastapi.exceptions.HTTPException

[ERROR][5:09:10.582 PM -03][service/bag-of-holding][apis.py:32]: 
KeyError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/pi/libs/commonwealth/src/commonwealth/utils/apis.py", line 30, in custom_route_handler
    return await original_route_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/blueos/venv/lib/python3.11/site-packages/fastapi/routing.py", line 274, in app
    raw_response = await run_endpoint_function(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/blueos/venv/lib/python3.11/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
    return await dependant.call(**values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/services/bag_of_holding/main.py", line 102, in read_data
    raise HTTPException(status_code=400, detail="Invalid path") from KeyError
fastapi.exceptions.HTTPException

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant