[PR #7110] [CLOSED] When handling an exception during an API query, send an error response containing structured information about the error rather than HTML #13212

Closed
opened 2025-12-29 22:26:01 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/7110
Author: @thatmattlove
Created: 9/1/2021
Status: Closed

Base: developHead: 7109-api-errors-html


📝 Commits (1)

  • 93b9b6d Fixes #7109: When handling an exception during an API query, send an error response containing structured information about the error rather than HTML

📊 Changes

2 files changed (+4 additions, -1 deletions)

View changed files

📝 docs/release-notes/version-3.0.md (+1 -0)
📝 netbox/netbox/api/views.py (+3 -1)

📄 Description

Fixes: #7109

See #7109 for more details. There seemed to be an already-written handler for such cases, this simply reuses it in the ModelViewSet view as a fallback.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/7110 **Author:** [@thatmattlove](https://github.com/thatmattlove) **Created:** 9/1/2021 **Status:** ❌ Closed **Base:** `develop` ← **Head:** `7109-api-errors-html` --- ### 📝 Commits (1) - [`93b9b6d`](https://github.com/netbox-community/netbox/commit/93b9b6d01c84e4f39a74396c48e33a2d6b690a39) Fixes #7109: When handling an exception during an API query, send an error response containing structured information about the error rather than HTML ### 📊 Changes **2 files changed** (+4 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `docs/release-notes/version-3.0.md` (+1 -0) 📝 `netbox/netbox/api/views.py` (+3 -1) </details> ### 📄 Description ### Fixes: #7109 See #7109 for more details. There seemed to be an already-written handler for such cases, this simply reuses it in the `ModelViewSet` view as a fallback. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 22:26:01 +01:00
adam closed this issue 2025-12-29 22:26:01 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#13212