-
Notifications
You must be signed in to change notification settings - Fork 253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change error message from API if rack space is already occupied #386
Comments
Thanks for the report! Some quick analysis: the "must make a unique set" is the default message returned by Django REST Framework when using a |
Seeing as that is a default error message from the Django framework core, how could we improve upon it to be more user-friendly? (Open-ended question for anyone who reads this) |
Ideally you can "tack on" without removing the original message. The original message is still helpful, as it provides consistency for this type of issue. |
Environment
Proposed Functionality
When creating a dcim.device via API, and the rack space is already occupied,
an error message should be understandable by the user.
Right now it returns a:
400 Bad Request: {'non_field_errors': ['The fields rack, position, face must make a unique set.']}
which is puzzling and not easy to understand,
I propose to change this to something like:
"Requested rack space is already occupied"
Use Case
A developer will get a better understandable error message and can fix his issue. This took me more than an hour to find out what was going on - granted I could have checked for the rack, but understanding the error would be still useful.
Database Changes
None
External Dependencies
None
The text was updated successfully, but these errors were encountered: