mirror of
https://github.com/HackSoftware/Django-Styleguide.git
synced 2025-10-02 09:46:37 +03:00
Merge pull request #177 from AtomsForPeace/patch-1
Update error handling in some_service function
This commit is contained in:
commit
d43445abde
|
@ -1613,7 +1613,7 @@ from rest_framework import exceptions
|
||||||
|
|
||||||
|
|
||||||
def some_service():
|
def some_service():
|
||||||
raise ValidationError("Error message here.")
|
raise exceptions.ValidationError("Some message")
|
||||||
```
|
```
|
||||||
|
|
||||||
The response payload is going to look like this:
|
The response payload is going to look like this:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user