Skip to content

Commit ae81db6

Browse files
When trying to parse ldap v3 error, value can be nil
1 parent 93d87c2 commit ae81db6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

v3/error.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ func GetLDAPError(packet *ber.Packet) error {
219219
return &Error{
220220
ResultCode: resultCode,
221221
MatchedDN: response.Children[1].Value.(string),
222-
Err: fmt.Errorf("%s", response.Children[2].Value.(string)),
222+
Err: fmt.Errorf("%v", response.Children[2].Value),
223223
Packet: packet,
224224
}
225225
}

0 commit comments

Comments
 (0)