(ctx *gin.Context, err error)
| 481 | } |
| 482 | |
| 483 | func handleApplicationError(ctx *gin.Context, err error) { |
| 484 | if errors.Is(err, gorm.ErrDuplicatedKey) { |
| 485 | ctx.AbortWithError(400, errors.New("sort key is not unique")) |
| 486 | } else { |
| 487 | ctx.AbortWithError(500, err) |
| 488 | } |
| 489 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…