You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
894 B

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. from rest_framework.exceptions import PermissionDenied, ValidationError
  2. class AutoLabelingPermissionDenied(PermissionDenied):
  3. default_detail = (
  4. "You do not have permission to perform auto labeling." "Please ask the project administrators to add you."
  5. )
  6. class URLConnectionError(ValidationError):
  7. default_detail = "Failed to establish a connection. Please check the URL or network."
  8. class AWSTokenError(ValidationError):
  9. default_detail = "The security token included in the request is invalid."
  10. class SampleDataException(ValidationError):
  11. default_detail = (
  12. "The response is empty. Maybe the sample data is not appropriate."
  13. "Please specify another sample data which returns at least one label."
  14. )
  15. class TemplateMappingError(ValidationError):
  16. default_detail = "The response cannot be mapped. You might need to change the template."