Skip to content

Commit 669c61f

Browse files
author
Branislav Bujisic
committed
Replace RestfulUnprocessableEntityException with RestfulNotFoundException if entity cannot be loaded.
1 parent 16ec9b9 commit 669c61f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugins/restful/RestfulEntityBase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1162,7 +1162,7 @@ protected function isValidEntity($op, $entity_id) {
11621162
);
11631163

11641164
if (!$entity = entity_load_single($entity_type, $entity_id)) {
1165-
throw new RestfulUnprocessableEntityException(format_string('The entity ID @id for @resource does not exist.', $params));
1165+
throw new RestfulNotFoundException(format_string('The entity ID @id for @resource does not exist.', $params));
11661166
}
11671167

11681168
list(,, $bundle) = entity_extract_ids($entity_type, $entity);

0 commit comments

Comments
 (0)