-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Summary:
the following endpoints contains 500 Internal Server Error when muted inputs are given:
{'deleteFeature', 'updateFeatureOfProduct', 'getFeaturesForProduct', 'deleteConfiguration', 'deleteFeatureOfProduct', 'addFeatureToProduct', 'addFeatureToConfiguration', 'addConfiguration', 'getProductByName', 'getConfigurationActivedFeatures'}
A non-existing object is not properly handled at server backend. Server should return 404 instead of 500 in this case.
Example:
input: curl http://localhost:8080/products/68PPY863VFRH2EL0TOYWVROTB97GOP3VQGBSDUBD7Z6GARR7263IYZ9Y50O9138G8QGR6I1P21
response: HTTP Status 500 - org.javiermf.features.exceptions.ObjectNotFoundException: Object with id 68PPY863VFRH2EL0TOYWVROTB97GOP3VQGBSDUBD7Z6GARR7263IYZ9Y50O9138G8QGR6I1P21 has not been found
An existing object is not properly handled at creation. Server should return 400 in this case
input: curl -x POST http://localhost:8080/products/104YC6TVEE6ZIV68NVH3LWBK8H1KCEUY/configurations/104YC6TVEE6ZIV68NVH3LWBK8H1KCEUY/features/104YC6TVEE6ZIV68NVH3LWBK8H1KCEUY
HTTP Status 500 - org.javiermf.features.exceptions.DuplicatedObjectException: Object with id 104YC6TVEE6ZIV68NVH3LWBK8H1KCEUY already exists