Parsing error handling and MAC retrieval on new snapshots #27
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
Test Deployed
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: ereuse/devicehub-django#27
Loading…
Reference in a new issue
No description provided.
Delete branch "pr_25"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
we try again the merge of #25
Done again PR #25.
Also reworked the exception handling and error messages on upload/import views.
Added a success message to display for these views.
Changed form validation onto the fields, because if the form itself failed but the file was read, then the file_input field showed a success icon (whilst displaying error messages), which is confusing given that it is the only field.
WIP: Parsing error handling and MAC retrieval on new snapshotsto Parsing error handling and MAC retrieval on new snapshotsI am confused by the raises in proposed code (I also found other ones in the current django app), maybe the use of raise you are doing here is fine, just review it again. Because I saw how a generic rise in django command crashed the application, but maybe when you use this kind of raise everything is fine https://docs.djangoproject.com/en/dev/ref/exceptions
I found a portion of the code that it is old (with other parts might happen the same!), this part; we don't need. We don't need the if settings.DEBUG anymore, we have a logger configuration that when DEBUG is there, a trace is always generated. And the old message is shorter and clearer than the new one. Done here ->
fc849f0360
Reviewed raises with @cayop (
57f9e28466
)@cayop needs to test it before merge
57f9e28466
to65788b36af
Ive use the exceptions mostly to catch the errors and propagate them with a cleaner message (for ValidationError to display). Mostly because those are shown to the user, which may not know what did wrong. If there is a better and more idiomatic way of raising errors let me know as im new to django.