Skip to content

Commit 4d38ca3

Browse files
committed
Don't silenty fail on auth config file corruption
1 parent 563b20e commit 4d38ca3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

server/crypto.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func CreateAuthenticator(path string, authOptions *AuthOptions) (*Authenticator,
4242
var auth Authenticator
4343
auth.path = path
4444
if err := json.Unmarshal(jsonBytes, &auth); err != nil {
45-
log.Printf("Could not parse .silverbullet.auth.json, resetting")
45+
return nil, fmt.Errorf("could not parse %s: %w (remove or fix the file to proceed)", path, err)
4646
}
4747
if err := auth.init(authOptions); err != nil {
4848
return nil, err

0 commit comments

Comments
 (0)