Skip to content

Improve api-frontend error handling on invalid X-PacketFence-Tenant-Id header #5787

Open
@satkunas

Description

@satkunas

Describe the bug
GET /api/v1/config/realm/DEFAULT

with header:

X-PacketFence-Tenant-Id: undefined (or any non numeric value)

produces

Sep 11 13:48:53 packetfence api-frontend[15216]: t=2020-09-11T13:48:53-0400 lvl=warn msg="Impossible to parse X-PacketFence-Tenant-Id undefined into a valid number, error: strconv.Atoi: parsing \"undefined\": invalid syntax" pid=15216 request-uuid=0e8a9641-f457-11ea-8d1b-080027d5be68

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions