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

Friendlier error for spaces in Bridges argument #123

Open
squeetus opened this issue Oct 12, 2018 · 3 comments
Open

Friendlier error for spaces in Bridges argument #123

squeetus opened this issue Oct 12, 2018 · 3 comments

Comments

@squeetus
Copy link
Contributor

For the main Bridges call (assignmentNumber, "username", "apikey"), if a user passes a username or apikey argument containing a space character then we get an ugly error message about invalid JSON. We should trap this error somehow and generate a more helpful message.

@esaule
Copy link
Member

esaule commented Jan 4, 2019

Is that linked to a bad encoding in the url? or is generated JSON screwed up?

@krs-world
Copy link
Contributor

krs-world commented Jan 4, 2019 via email

@squeetus
Copy link
Contributor Author

squeetus commented Jan 4, 2019

Currently in the Java client, usernames with spaces are modified to encode spaces as '+' signs, so this issue only occurs if someone passes an apikey string including a space to Bridges. This causes the query parameter of the post url to be malformed, and Java throws an 'Illegal character in query' exception.

Perhaps this is ok - user's apikey strings are pretty self-explanatory. But we also could check the string when we create the Bridges object to make sure it is a valid apikey format.

This is not critical.

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

3 participants