Commit 27fcab30 authored by Sietse Ringers's avatar Sietse Ringers
Browse files

Don't forget to return scheme manager errors if any

parent 3ee8b7e4
......@@ -129,10 +129,13 @@ func New(
if err != nil {
return nil, err
}
err = cm.Configuration.ParseFolder()
_, isSchemeMgrErr := err.(*irma.SchemeManagerError)
if err != nil && !isSchemeMgrErr {
return nil, err
schemeMgrErr := cm.Configuration.ParseFolder()
// If schemMgrErr is of type SchemeManagerError, we continue and
// return it at the end; otherwise bail out now
_, isSchemeMgrErr := schemeMgrErr.(*irma.SchemeManagerError)
if schemeMgrErr != nil && !isSchemeMgrErr {
return nil, schemeMgrErr
}
// Ensure storage path exists, and populate it with necessary files
......@@ -173,7 +176,7 @@ func New(
return nil, errors.New("Too many keyshare servers")
}
return cm, nil
return cm, schemeMgrErr
}
// CredentialInfoList returns a list of information of all contained credentials.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment