REST API Response code for malformed requests

Env: 1IM 9.2

App Server REST API

When consuming App Server REST API endpoint api/entities/<entity_name> the consumer can specify the list of columns/attributes included in the response by setting a semicolon separated list of attributes on the displayColumns header 

If a column name in the list is wrong or non existing the API returns: 

500 ViException

{
"responseStatus": {
"message": "An error occurred."
},
"errorString": "An error occurred.",
"exceptions": [
{
"number": 2072000,
"message": "An error occurred."
}
]
}

Form my point of view:

  • Response code 500 describes an Internal Server Error, usually means "The request couldn’t be completed successfully because of an issue on the server’s end"  and therefore is responsability of the provider to solve,

Open Question: Could  400 Bad Request be a more accurate response code for this scenario ?   

  • "Response code 400 Bad Request is returned when the request’s structure is invalid, missing required fields, or can’t be parsed", in this specific case the header is part of the request and malformed, the consumer is reponsible to fix the request and retry