Skip to content

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

@mitquinn

Description

@mitquinn

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": "..."
}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions