Summary
The RestoreDeployment handler in platform-api/src/internal/handler/webbroker_api_deployment.go does not validate that deploymentId and gatewayId are non-empty before invoking the service layer. This can result in unclear errors reaching the client instead of an explicit 400 Bad Request response.
The UndeployDeployment handler in the same file already performs these checks and can serve as the reference implementation.
Expected Behavior
If deploymentId or gatewayId is empty, the handler should return HTTP 400 with a descriptive error message before calling RestoreWebBrokerAPIDeploymentByHandle.
References
Requested by @senthuran16
Summary
The
RestoreDeploymenthandler inplatform-api/src/internal/handler/webbroker_api_deployment.godoes not validate thatdeploymentIdandgatewayIdare non-empty before invoking the service layer. This can result in unclear errors reaching the client instead of an explicit400 Bad Requestresponse.The
UndeployDeploymenthandler in the same file already performs these checks and can serve as the reference implementation.Expected Behavior
If
deploymentIdorgatewayIdis empty, the handler should returnHTTP 400with a descriptive error message before callingRestoreWebBrokerAPIDeploymentByHandle.References
Requested by @senthuran16