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

Creating DB with invalid name fails silently #4

Closed
ghost opened this issue Feb 8, 2013 · 2 comments
Closed

Creating DB with invalid name fails silently #4

ghost opened this issue Feb 8, 2013 · 2 comments

Comments

@ghost
Copy link

ghost commented Feb 8, 2013

Currently using an invalid name (it appears the CouchDB rules below are enforced) for a database fails silently, i.e. the TDDatabase returned is nil but the error property is not populated.

I'm using the following code to cteate the database, in my initial use case I used an email address for the DB name.

TDDatabase *myDb = [dbManager createDatabaseNamed:@"me@example.com" error:&error];

I think the expected behavior would be to return nil for the database and populate the error with a description of the supported naming format.

Naming and Addressing (from CouchDB wiki)
A database must be named with all lowercase letters (a-z), digits (0-9), or any of the _$()+-/ characters and must end with a slash in the URL. The name has to start with a lowercase letter (a-z).

@snej
Copy link
Contributor

snej commented Feb 9, 2013

Good point. The underlying call doesn't return an NSError, but the public method should create one in that case.

@rismay
Copy link

rismay commented Feb 9, 2013

I ran into the same issue. I tried to debug by inspecting the NSError and got nothing. Thanks for posting this issue.

@snej snej closed this as completed in 76593c3 Feb 10, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants