Skip to content

Commit

Permalink
🔧 Changed invalid hex format to Bad Request status
Browse files Browse the repository at this point in the history
  • Loading branch information
keelus committed Jul 28, 2023
1 parent 0eecf30 commit 915f282
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/handlers/apiHandler/ledHandler/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func Add(c *gin.Context) {
hex := strings.ToUpper(c.PostForm("hexValue"))
_, err := strconv.ParseUint(hex, 16, 32)
if err != nil {
c.JSON(http.StatusForbidden, gin.H{"details": "Bad hex format."})
c.JSON(http.StatusBadRequest, gin.H{"details": "Bad hex format."})
return
}

Expand Down

0 comments on commit 915f282

Please sign in to comment.