-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rename SnackbarException -> SnackbarError
- Loading branch information
Showing
3 changed files
with
7 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
from rest_framework.exceptions import ValidationError | ||
|
||
|
||
class SnackbarException(ValidationError): | ||
class SnackbarError(ValidationError): | ||
def __init__(self, message): | ||
super().__init__({'snackbar_message': message}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
from rest_framework.views import APIView | ||
|
||
from ckc.exceptions import SnackbarException | ||
from ckc.exceptions import SnackbarError | ||
|
||
|
||
class TestExceptionsViewSet(APIView): | ||
def get(self, request, *args, **kwargs): | ||
raise SnackbarException('This is a test exception') | ||
raise SnackbarError('This is a test exception') |