diff --git a/README.md b/README.md index 2e953f5a..566e5cc7 100644 --- a/README.md +++ b/README.md @@ -930,7 +930,7 @@ func main() { route.GET("/:name/:id", func(c *gin.Context) { var person Person if err := c.ShouldBindUri(&person); err != nil { - c.JSON(400, gin.H{"msg": err}) + c.JSON(400, gin.H{"msg": err.Error()}) return } c.JSON(200, gin.H{"name": person.Name, "uuid": person.ID})