refactor: improve error handling, validation and proper cleanup

This commit is contained in:
yusing
2026-01-25 19:18:14 +08:00
parent 0633cacb2a
commit 73cba8b508
12 changed files with 52 additions and 30 deletions

View File

@@ -37,5 +37,5 @@ func Route(c *gin.Context) {
c.JSON(http.StatusOK, route)
return
}
c.JSON(http.StatusNotFound, nil)
c.JSON(http.StatusNotFound, apitypes.Error("route not found"))
}