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

Course creation: validation errors return to student role instead of 403 error #42

Closed
plushkinaaa opened this issue Jun 25, 2022 · 1 comment

Comments

@plushkinaaa
Copy link

Steps to reproduce

  1. Authorize by student role
  2. Send post request http://qa-school-test.quantori.academy/api/v1/courses without body

Actual behavior

{
    "errors": [
        {
            "msg": "Please send required fields: title",
            "param": "title",
            "location": "body"
        },
        {
            "msg": "Parameter should be a string",
            "param": "title",
            "location": "body"
        },
        {
            "msg": "Minimum category length is: 3",
            "param": "title",
            "location": "body"
        },
        {
            "msg": "Only RU/EN alphabet, space and digits allowed, please change your request",
            "param": "title",
            "location": "body"
        },
        {
            "msg": "You are not allowed to use spaces only",
            "param": "title",
            "location": "body"
        }
    ]
}

Expected behavior

{
    "errors": "This action is forbidden for role student"
}
@viraxslot
Copy link
Owner

Same reason as here #41
I'd close this issue.

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

2 participants