[management] Propagate error in store errors (#2709)

This commit is contained in:
pascal-fischer
2024-10-09 14:33:58 +02:00
committed by GitHub
parent 44e8107383
commit d4ef84fe6e
2 changed files with 29 additions and 25 deletions

View File

@@ -102,8 +102,12 @@ func NewPeerLoginExpiredError() error {
}
// NewSetupKeyNotFoundError creates a new Error with NotFound type for a missing setup key
func NewSetupKeyNotFoundError() error {
return Errorf(NotFound, "setup key not found")
func NewSetupKeyNotFoundError(err error) error {
return Errorf(NotFound, "setup key not found: %s", err)
}
func NewGetAccountFromStoreError(err error) error {
return Errorf(Internal, "issue getting account from store: %s", err)
}
// NewGetUserFromStoreError creates a new Error with Internal type for an issue getting user from store