channels icon indicating copy to clipboard operation
channels copied to clipboard

valid_group_name throwing wrong exception message

Open ericls opened this issue 5 years ago • 4 comments

valid_group_name always throws the message Group name must be a valid unicode string containing only ASCII alphanumerics, hyphens, or periods., even if the actual error is group name being too long. Would be helpful if we throw a different message or include the length limit in the message.

ericls avatar Jan 24 '19 17:01 ericls

I agree, it would be helpful, this wouldn't be too hard for someone to write a patch for.

andrewgodwin avatar Jan 24 '19 17:01 andrewgodwin

I'll submit a PR shortly. Also, is it documented anywhere why there's a restriction on the length of the names? Thank you!

ericls avatar Jan 24 '19 18:01 ericls

There's no specific reason, but it's so the names can be more easily portable across different backends. Unlimited length names would be hard to deal with in some places.

andrewgodwin avatar Jan 24 '19 18:01 andrewgodwin

Thank you for your report and patch proposal.

Please remember that after code and test comes refactor, and that also applies on tests.

Also we need the change documented.

jpic avatar Jan 30 '19 23:01 jpic