Skip to content

Multiple 500 Internal Server Error caused by muted input parameters. #13

@victomteng1997

Description

@victomteng1997

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions