Comments (5)
The technical reason for this discrepancy appears to be because InterfaceFilterSet.device
filter is a custom method filter (to account for interfaces on devices that are part of a virtual-chassis), which is explicitly returning queryset.none()
in the case of DeviceDoesNotExist
exception. Fixing this is probably as simple as changing that exception handling logic to raise an appropriate 400 error.
from nautobot.
Would an HTTP 404 be a better response code for this class of conditions?
from nautobot.
related: #5867
from nautobot.
My preference to remain REST compliant is that we return 0 results. This is technically a change in behavior so we will defer this to 3.0.
from nautobot.
I've not even attempted an exhaustive test to see which API calls return a 400
, but as a data point, I did just trip over the fact that /relationship-associations/
returns a 400
if the passed relationship
argument which doesn't exist:
{
"relationship": [
"Select a valid choice. foo is not one of the available choices."
]
}
...but returns a 200/OK with count=0 if you pass an id
parameter which doesn't exist. As this seemed so closely related, I added it to this issue but LMK if you'd prefer I open a new issue on this.
from nautobot.
Related Issues (20)
- `test_filters_generic` failing on `associated_contacts` related tests in apps
- Change Log on not showing change objects on home page HOT 1
- [GraphQL] Devices interfaces of Virtual Chassis master doesn't retrieve all members' interfaces HOT 2
- [GraphQL] id variable type is ID for single object query but [String] for everything else
- Add "check migrations" step to upstream testing base
- Prevent user deletion of Job records corresponding to System jobs
- Configuration Context docs to be updated for dictionary of dictionary merging
- Address test case TODOs leftover from 2.3.0 development
- CloudNetwork.cloud_account.provider should be enforced to match CloudNetwork.cloud_resource_type.provider
- Permissions documentation should explain specifics around SavedView operations.
- [2.3] Removing a content-type from a `MetadataType` has no effect on existing `ObjectMetadata`
- [2.3] Changing/deleting a `MetadataChoice` doesn't propagate to existing `ObjectMetadata`
- Add model and manufacturer for racks
- Add isnull as filter expression to custom fields
- Permission constraint applied to Custom Field causes pre_migrate KeyTransform AttributeError exception
- Jinja Template Support for Stored GraphQL Queries HOT 2
- Job Queue Model
- k8s Jobs - Enqueue to k8s
- k8s Jobs - run_job updates
- k8s Jobs - status updates
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nautobot.