Fix a code error in example

Should be `err.Error()` rather than `err.String()` which is not existed