Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -48,6 +48,9 @@ func (h *AuthHandler) Login(c *gin.Context) {
|
||||
status = http.StatusTooManyRequests
|
||||
} else if errors.Is(err, service.ErrPlatformNotAllowed) {
|
||||
status = http.StatusForbidden
|
||||
} else if errors.Is(err, service.ErrDeviceLimitReached) {
|
||||
c.JSON(http.StatusConflict, gin.H{"error": err.Error(), "code": "DEVICE_LIMIT"})
|
||||
return
|
||||
}
|
||||
c.JSON(status, gin.H{"error": err.Error()})
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user