KeyError exception raised when an unauthenticated request is made to provision a new API token #6783

Closed
opened 2025-12-29 19:45:21 +01:00 by adam · 0 comments
Owner

Originally created by @jeremystretch on GitHub (Aug 8, 2022).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v3.2.7

Python version

3.8

Steps to Reproduce

  1. Make a POST request to /api/users/tokens/provision/ with an empty request body.

Expected Behavior

The API should return a validation error indicating the absence of user credentials.

Observed Behavior

A KeyError exception is raised. (This is not a security issue, but merely an unhandled exception.)

Originally created by @jeremystretch on GitHub (Aug 8, 2022). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v3.2.7 ### Python version 3.8 ### Steps to Reproduce 1. Make a POST request to `/api/users/tokens/provision/` with an empty request body. ### Expected Behavior The API should return a validation error indicating the absence of user credentials. ### Observed Behavior A KeyError exception is raised. (This is not a security issue, but merely an unhandled exception.)
adam added the type: bugstatus: accepted labels 2025-12-29 19:45:21 +01:00
adam closed this issue 2025-12-29 19:45:21 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#6783