Files
centurion_erp/app/api/exceptions.py
Jon 5fe2269e98 feat(api): Custom exception UnknownTicketType
for use when attempting to detect ticket type

ref: #248 #365
2024-11-28 02:22:16 +09:30

9 lines
272 B
Python

from rest_framework.exceptions import APIException
from rest_framework import status
class UnknownTicketType(APIException):
status_code = status.HTTP_400_BAD_REQUEST
default_detail = 'Unable to determin the ticket type.'
default_code = 'unknown_ticket_type'