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

Wrong error message being returned with query is missing from request #342

Open
mitquinn opened this issue Aug 9, 2023 · 0 comments
Open
Assignees
Labels

Comments

@mitquinn
Copy link
Contributor

mitquinn commented Aug 9, 2023

Description of the issue

When using the search api: https://developer.box.com/reference/get-search/

"query" is a required field. #341

But also the error message for this field missing is incorrect. The message returned is:

{
    "type": "error",
    "status": 400,
    "code": "bad_request",
    "context_info": {
        "errors": [
            {
                "reason": "missing_parameter",
                "name": "to_search",
                "message": "'to_search' is required"
            }
        ]
    },
    "help_url": "http:\/\/developers.box.com\/docs\/#errors",
    "message": "Bad Request",
    "request_id": "..."
}

Notice to the returned field is to_search

The correct field should be query

Current content

{
    "type": "error",
    "status": 400,
    "code": "bad_request",
    "context_info": {
        "errors": [
            {
                "reason": "missing_parameter",
                "name": "to_search",
                "message": "'to_search' is required"
            }
        ]
    },
    "help_url": "http:\/\/developers.box.com\/docs\/#errors",
    "message": "Bad Request",
    "request_id": "..."
}

Expected content

{
    "type": "error",
    "status": 400,
    "code": "bad_request",
    "context_info": {
        "errors": [
            {
                "reason": "missing_parameter",
                "name": "query",
                "message": "'query' is required"
            }
        ]
    },
    "help_url": "http:\/\/developers.box.com\/docs\/#errors",
    "message": "Bad Request",
    "request_id": "..."
}
@mitquinn mitquinn added the bug label Aug 9, 2023
@bszwarc bszwarc self-assigned this Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants