-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherrors.go
More file actions
30 lines (22 loc) · 1.21 KB
/
errors.go
File metadata and controls
30 lines (22 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package model
import "errors"
var (
// ErrNoRecord is returned when a database query or search operation
// fails to find a specific row or entity.
ErrNoRecord = errors.New("models: no matching record found")
// ErrInvalidCredentials is returned during authentication flows when
// the provided username/email and password do not match our records.
ErrInvalidCredentials = errors.New("models: invalid credentials")
// ErrDuplicateEmail is returned when an attempt is made to register or
// update a user with an email address that already exists in the system.
ErrDuplicateEmail = errors.New("models: duplicate email")
// ErrEditConflict is returned when an optimistic locking check fails
// (e.g., the version in the DB is different from the version provided).
ErrEditConflict = errors.New("models: edit conflict")
// --- Game/Upload Specific Errors ---
// ErrUploadEmpty is returned when a processed CSV contains no valid game rows.
ErrUploadEmpty = errors.New("models: upload contains no data")
// ErrDailyLimitExceeded is returned if the very first row of an upload
// already puts the system over the 95% deposit threshold.
ErrDailyLimitExceeded = errors.New("models: daily stake threshold already reached")
)