Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validation check problem with custom exceptions #26

Open
char-pap opened this issue Dec 7, 2020 · 0 comments
Open

Validation check problem with custom exceptions #26

char-pap opened this issue Dec 7, 2020 · 0 comments

Comments

@char-pap
Copy link

char-pap commented Dec 7, 2020

There is a problem occuring with the validation checker. The current one:

def _check_validatation_data(self, data):
        detail_key = "detail"  
        if detail_key in data:  
            return False  
        return True

checks only for 'detail' inside the data and this creates a problem when a custom exception handling exists or even if some response actually has the key "detail" inside.

Proposal: Validate via the response status code. If it is in the range of HTTP 2xx it's True.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant