from rest_framework.exceptions import APIException


class RequestBodyValidationException(APIException):
    def __init__(self, detail=None, code=None):
        super().__init__({
            'error': 'ERROR_REQUEST_BODY_VALIDATION',
            'detail': detail
        }, code=code)
        self.status_code = 400
