Enhance authentication error handling with specific error codes and inline validation feedback

This commit is contained in:
Leon Bösche
2026-02-01 00:24:19 +01:00
parent 17ac65a493
commit 96a044450f
5 changed files with 124 additions and 16 deletions

View File

@@ -14,7 +14,11 @@ import (
type ErrorCode string
const (
CodeUnauthenticated ErrorCode = "UNAUTHENTICATED"
CodeUnauthenticated ErrorCode = "UNAUTHENTICATED"
// More specific authentication error codes
CodeInvalidCredentials ErrorCode = "INVALID_CREDENTIALS"
CodeInvalidPassword ErrorCode = "INVALID_PASSWORD"
CodePermissionDenied ErrorCode = "PERMISSION_DENIED"
CodeNotFound ErrorCode = "NOT_FOUND"
CodeConflict ErrorCode = "CONFLICT"