Skip to content

Commit 4c2f620

Browse files
authored
Merge pull request #735 from slahirucd7/main
Correct response code considering the API associated gateway deletion
2 parents 1c6f08f + 4793a29 commit 4c2f620

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

platform-api/src/internal/handler/gateway.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ func (h *GatewayHandler) DeleteGateway(c *gin.Context) {
259259
}
260260
if errors.Is(err, constants.ErrGatewayHasAssociatedAPIs) {
261261
utils.LogError("Gateway has associated APIs during deletion", err)
262-
c.JSON(http.StatusBadRequest, utils.NewErrorResponse(400, "Bad Request",
262+
c.JSON(http.StatusConflict, utils.NewErrorResponse(409, "Conflict",
263263
"The gateway has associated APIs. Please remove all API associations before deleting the gateway"))
264264
return
265265
}

0 commit comments

Comments
 (0)