Skip to content

Handle KeyError when request details is not existing anymore #13

@AlTosterino

Description

@AlTosterino

Hey!

Currently, if you are on __request__tracker__ and restart the app, request tracker throws unhandled KeyError if you want to go into request details (which is not saved anywhere at this moment)

 File "/python3.11/site-packages/requests_tracker/views.py", line 118, in request_details
    context = request.request_collectors[UUID(str(request_id))].get_as_context()
              │       │                  │        └ 'bf1f647d-d71e-4ab9-a23a-b9268ead6e10'
              │       │                  └ <class 'uuid.UUID'>
              │       └ {}
              └ <ASGIRequest: GET '/__requests_tracker__/request-details/bf1f647d-d71e-4ab9-a23a-b9268ead6e10'>

KeyError: UUID('bf1f647d-d71e-4ab9-a23a-b9268ead6e10')

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