mirror of
https://github.com/TecharoHQ/anubis.git
synced 2026-04-15 21:04:56 +00:00
fix(lib): detect failures on challenge method initialization
Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
@@ -175,7 +175,9 @@ func New(opts Options) (*Server, error) {
|
||||
|
||||
for _, implKind := range challenge.Methods() {
|
||||
impl, _ := challenge.Get(implKind)
|
||||
impl.Setup(mux)
|
||||
if err := impl.Setup(mux); err != nil {
|
||||
return nil, fmt.Errorf("failed to init challenge method %s: %w", implKind, err)
|
||||
}
|
||||
}
|
||||
|
||||
result.mux = mux
|
||||
|
||||
Reference in New Issue
Block a user