Skip to content
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

Enhanced errors notifications #7371

Merged
merged 10 commits into from
Jan 19, 2024
Merged

Enhanced errors notifications #7371

merged 10 commits into from
Jan 19, 2024

Conversation

bsekachev
Copy link
Member

@bsekachev bsekachev commented Jan 18, 2024

Motivation and context

Resolved #7365

Examples:

image
instead of
image

image
instead of
image

image
instead of
image

image
instead of
image

image
instead of
image

How has this been tested?

Checklist

  • I submit my changes into the develop branch
  • I have created a changelog fragment
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • I have linked related issues (see GitHub docs)
  • I have increased versions of npm packages if it is necessary
    (cvat-canvas,
    cvat-core,
    cvat-data and
    cvat-ui)

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.

@@ -56,7 +57,7 @@ def save(self, request):
if "password1" in self.cleaned_data:
try:
adapter.clean_password(self.cleaned_data['password1'], user=user)
except ValidationError as exc:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong exception class used, it caused 500 server error because of unhandled exception

Copy link

codecov bot commented Jan 18, 2024

Codecov Report

Merging #7371 (16a6a78) into develop (d25b863) will decrease coverage by 0.06%.
Report is 5 commits behind head on develop.
The diff coverage is 83.33%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #7371      +/-   ##
===========================================
- Coverage    83.26%   83.20%   -0.06%     
===========================================
  Files          373      373              
  Lines        39615    39714      +99     
  Branches      3701     3720      +19     
===========================================
+ Hits         32984    33043      +59     
- Misses        6631     6671      +40     
Components Coverage Δ
cvat-ui 78.93% <85.71%> (-0.11%) ⬇️
cvat-server 87.12% <50.00%> (+<0.01%) ⬆️

@klakhov
Copy link
Contributor

klakhov commented Jan 19, 2024

@bsekachev
If rest_framework.exceptions.ValidationError contains just a string:
raise ValidationError("just a string rest_framework.exceptions.ValidationError")
we get a 0 key in message, which is not good:
image

@bsekachev bsekachev merged commit a5669aa into develop Jan 19, 2024
34 checks passed
@bsekachev bsekachev deleted the bs/better_errors_messaging branch January 22, 2024 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve error message when cloud storage cannot receieve data
2 participants