Skip to content Search Apps Documentation Source Content File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

errors.gno

0.50 Kb · 18 lines
 1package referral
 2
 3import (
 4	ufmt "gno.land/p/nt/ufmt/v0"
 5)
 6
 7const (
 8	ErrInvalidAddress  = "invalid address format"
 9	ErrSelfReferral    = "self referral is not allowed"
10	ErrUnauthorized    = "unauthorized caller"
11	ErrTooManyRequests = "too many requests: operations allowed once per 24 hours for each address"
12	ErrNotFound        = "referral not found"
13	ErrInvalidTime     = "invalid time format"
14)
15
16func makeErrorWithDetails(message string, detail string) error {
17	return ufmt.Errorf("%s: %s", message, detail)
18}