You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
now will get an error when delete not exist experiment:
$ curl -X DELETE 127.0.0.1:31767/api/attack/1234
{"error":true,"message":"error.api.internal_server_error: record not found","code":"error.api.internal_server_error","full_text":"error.api.internal_server_error: record not found\n at github.com/chaos-mesh/chaosd/pkg/server/httpserver.handleError()\n\t/home/xiang/chaosd/pkg/server/httpserver/server.go:227\n at github.com/chaos-mesh/chaosd/pkg/server/httpserver.(*httpServer).recoverAttack()\n\t/home/xiang/chaosd/pkg/server/httpserver/server.go:216\n at github.com/gin-gonic/gin.(*Context).Next()\n\t/home/xiang/go/pkg/mod/github.com/gin-gonic/gin@v1.6.3/context.go:161\n at github.com/chaos-mesh/chaosd/pkg/server/utils.MWHandleErrors.func1()\n\t/home/xiang/chaosd/pkg/server/utils/error.go:46\n at github.com/gin-gonic/gin.(*Context).Next()\n\t/home/xiang/go/pkg/mod/github.com/gin-gonic/gin@v1.6.3/context.go:161\n at github.com/gin-gonic/gin.RecoveryWithWriter.func1()\n\t/home/xiang/go/pkg/mod/github.com/gin-gonic/gin@v1.6.3/recovery.go:83\n at github.com/gin-gonic/gin.(*Context).Next()\n\t/home/xiang/go/pkg/mod/github.com/gin-gonic/gin@v1.6.3/context.go:161\n at github.com/gin-gonic/gin.LoggerWithConfig.func1()\n\t/home/xiang/go/pkg/mod/github.com/gin-gonic/gin@v1.6.3/logger.go:241\n at github.com/gin-gonic/gin.(*Context).Next()\n\t/home/xiang/go/pkg/mod/github.com/gin-gonic/gin@v1.6.3/context.go:161\n at github.com/gin-gonic/gin.(*Engine).handleHTTPRequest()\n\t/home/xiang/go/pkg/mod/github.com/gin-gonic/gin@v1.6.3/gin.go:409\n at github.com/gin-gonic/gin.(*Engine).ServeHTTP()\n\t/home/xiang/go/pkg/mod/github.com/gin-gonic/gin@v1.6.3/gin.go:367\n at net/http.serverHandler.ServeHTTP()\n\t/usr/local/go/src/net/http/server.go:2887\n at net/http.(*conn).serve()\n\t/usr/local/go/src/net/http/server.go:1952\n at runtime.goexit()\n\t/usr/local/go/src/runtime/asm_amd64.s:1371"}
it's better to return 404 status code.
The text was updated successfully, but these errors were encountered:
now will get an error when delete not exist experiment:
it's better to return 404 status code.
The text was updated successfully, but these errors were encountered: