Tell the user when they don't give us an address

Issue: #25
This commit is contained in:
Eli Ribble 2026-05-24 21:27:16 +00:00
parent 34f4980ad5
commit f4756637d6
No known key found for this signature in database
5 changed files with 67 additions and 48 deletions

View file

@ -29,6 +29,8 @@ import (
"source.gleipnir.technology/Gleipnir/nidus-sync/platform/types"
)
var ErrNoAddress = errors.New("no-address")
// GenerateReportID creates a 12-character random string using only unambiguous
// capital letters and numbers
func GenerateReportID() (string, error) {
@ -366,7 +368,7 @@ func publicReportCreate(ctx context.Context, setter_report modelpublicreport.Rep
}
addr = &geo_res.Address
} else {
return result, fmt.Errorf("empty address")
return result, ErrNoAddress
}
}