Skip to content

Crash when user agent is None #282

@leplatrem

Description

@leplatrem

https://sentry.io/organizations/mozilla/issues/3532760648/?environment=stage&project=6364263&query=is%3Aunresolved

ValidationError: 1 validation error for RequestSummary
agent
  none is not an allowed value (type=type_error.none.not_allowed)
  File "starlette/applications.py", line 124, in __call__
    await self.middleware_stack(scope, receive, send)
  File "starlette/middleware/errors.py", line 184, in __call__
    raise exc
  File "starlette/middleware/errors.py", line 162, in __call__
    await self.app(scope, receive, _send)
  File "starlette/middleware/base.py", line 72, in __call__
    response = await self.dispatch_func(request, call_next)
  File "jbi/app.py", line 56, in request_summary
    log_fields = format_request_summary_fields(
  File "jbi/log.py", line 66, in format_request_summary_fields
    return RequestSummary(
  File "pydantic/main.py", line 342, in pydantic.main.BaseModel.__init__
    raise validation_error

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions