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

api/v5/init bad requests from Mathia/Portal? #2133

Open
danoswaltCL opened this issue Nov 26, 2024 · 0 comments
Open

api/v5/init bad requests from Mathia/Portal? #2133

danoswaltCL opened this issue Nov 26, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@danoswaltCL
Copy link
Collaborator

Version where bug was found:
6.0 (possibly before also?)

Describe the bug
There is a itinerant validation error on v5/init that I don't believe was occurring previously before deploying 6. These requests are from Mathia, it might be from the UI side?

The impact is probably not huge, because when I look up these ids, they are generally already init'ed with valid groups and such.

ExperimentUserValidator was changed in v6, we probably should not have touched v5 validator code, but when I look into it, I'm not convinced this should have made a difference.

It's a little weird that a request is being made that looks like this though:

Image

{
    "client_session_id": "6db51e09-8fa6-4757-b1e1-7a717e0a8610",
    "endpoint": "/v5/init",
    "level": "error",
    "message": {
        "endPoint": "/api/v5/init",
        "errorCode": 400,
        "message": "Invalid body, check 'errors' property for more info.",
        "name": "BadRequestError",
        "request": {
            "group": {
                "classId": [
                    ""
                ],
                "schoolId": [
                    ""
                ]
            },
            "id": "638000a9-472f-45a0-9ae7-9ab24cfddc7c"
        },
        "type": "Parameter not in the correct format"
    },
    "request_id": "ab5dd35b-145d-4189-8dc8-8247461af77b",
    "request_method_type": "POST"
}

For whatever reason (a bug in debugging), the logs don't always show there rest of the error, the actual validation error is this:

{
            "property": "group",
            "children": [],
            "constraints": {
                "IsGroupRecord": "The Group is not a valid Record<string, string[]>"
            }
        }
@danoswaltCL danoswaltCL added the bug Something isn't working label Nov 26, 2024
@danoswaltCL danoswaltCL changed the title api/v5/init bad requests with no api/v5/init bad requests from Mathia Nov 26, 2024
@danoswaltCL danoswaltCL changed the title api/v5/init bad requests from Mathia api/v5/init bad requests from Mathia/Portal? Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

1 participant