Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error if mongo URL has readPreference, but no readPreferenceTags #212

Closed
JohannesSoots opened this issue Sep 19, 2023 · 2 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@JohannesSoots
Copy link

Hi! When passing readPreference in mongo url without readPreferenceTags also in the url then getting following error:

 ** (FunctionClauseError) no function clause matching in String.split/3    
     
     The following arguments were given to String.split/3:
     
         # 1
         []
     
         # 2
         ","
     
         # 3
         []
     
     (elixir 1.14.0) lib/string.ex:479: String.split/3
     (mongodb_driver 1.2.0) lib/mongo/url_parser.ex:241: Mongo.UrlParser.parse_tags/1
     (mongodb_driver 1.2.0) lib/mongo/url_parser.ex:220: Mongo.UrlParser.extend_read_preference_tags/2
     (mongodb_driver 1.2.0) lib/mongo/url_parser.ex:207: Mongo.UrlParser.process_read_preferences/1
     (mongodb_driver 1.2.0) lib/mongo/url_parser.ex:186: Mongo.UrlParser.parse_url/1
     (mongodb_driver 1.2.0) lib/mongo.ex:140: Mongo.start_link/1

Related to #206

@zookzook zookzook self-assigned this Sep 19, 2023
@zookzook zookzook added the bug Something isn't working label Sep 19, 2023
@zookzook
Copy link
Owner

It is fixed in the master branch:
50ea98d

Feel free to check it!

@zookzook
Copy link
Owner

Closing due to no response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants