REST API v2: get entity by id with non-uuid conform :entityId parameter returns HTTP 500

Hi,

i found that when i use the REST API v2 and want to a single entity with an :entityId string that is no UUID but the entity requires a UUID as a identifier - then the result is: HTTP Response 500


{
  "error": "Server error",
  "details": ""
}

The internal exception is a java.lang.NumberFormatException that has its origin in https://github.com/cuba-platform/cuba/blob/master/modules/rest-api/src/com/haulmont/restapi/service/EntitiesControllerManager.java#L249
It would be great if it would answer HTTP 404 - NOT FOUND, because the entity could not be found instead.

Bye
Mario

Hi Mario,

Since the release 6.5 the BAD REQUEST answer is returned with the error message “Invalid entity ID”.