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

Improved error when adding project without admin rights. #61

Merged
merged 3 commits into from Jan 25, 2016

Conversation

Projects
None yet
3 participants
@alexfernandez
Contributor

alexfernandez commented Jan 25, 2016

When trying to add a project where you don't have admin rights, right now the error message is:

Error creating project for repo owner/project:
{"results":[],"status":"error","errors":[{"code":500,
"reason":"Failed to setup repo: Bad status code: 404"}]}

Now should show:

"reason":"Failed to setup repo: Cannot create webhooks; are you sure you have admin rights?"}]}

Also added a known issue to the README.md.

Should solve issue #60.

Show outdated Hide outdated lib/api.js
@alexfernandez

This comment has been minimized.

Show comment
Hide comment
@alexfernandez

alexfernandez Jan 25, 2016

Contributor

Changed in commit a93098f.

Contributor

alexfernandez commented Jan 25, 2016

Changed in commit a93098f.

knownasilya added a commit that referenced this pull request Jan 25, 2016

Merge pull request #61 from alexfernandez/master
Improved error when adding project without admin rights.

@knownasilya knownasilya merged commit 2bb1b10 into Strider-CD:master Jan 25, 2016

1 check was pending

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
@knownasilya

This comment has been minimized.

Show comment
Hide comment
@knownasilya

knownasilya Jan 25, 2016

Member

Published as 2.2.1

Member

knownasilya commented Jan 25, 2016

Published as 2.2.1

@alexfernandez

This comment has been minimized.

Show comment
Hide comment
@alexfernandez

alexfernandez Jan 25, 2016

Contributor

Great, thanks! This way other clueless newbies like myself will have it easier :)

Contributor

alexfernandez commented Jan 25, 2016

Great, thanks! This way other clueless newbies like myself will have it easier :)

@knownasilya

This comment has been minimized.

Show comment
Hide comment
@knownasilya

knownasilya Jan 26, 2016

Member

@alexfernandez really appreciate it. This project can only stay alive because of people like you, who contribute back.

Member

knownasilya commented Jan 26, 2016

@alexfernandez really appreciate it. This project can only stay alive because of people like you, who contribute back.

@oliversalzburg

This comment has been minimized.

Show comment
Hide comment
@oliversalzburg

oliversalzburg Jan 26, 2016

Contributor

I'm not sure if this would work, but couldn't we include url in the error message?

As in:

badStatusErr = new Error('Cannot create webhooks; are you sure you have admin rights?\nFeel free to manually create a webhook for ' + url);
Contributor

oliversalzburg commented Jan 26, 2016

I'm not sure if this would work, but couldn't we include url in the error message?

As in:

badStatusErr = new Error('Cannot create webhooks; are you sure you have admin rights?\nFeel free to manually create a webhook for ' + url);
@knownasilya

This comment has been minimized.

Show comment
Hide comment
@knownasilya

knownasilya Jan 26, 2016

Member

@oliversalzburg good idea, will add it.

Member

knownasilya commented Jan 26, 2016

@oliversalzburg good idea, will add it.

@oliversalzburg

This comment has been minimized.

Show comment
Hide comment
@oliversalzburg

oliversalzburg Jan 26, 2016

Contributor

@knownasilya I'm not sure if the hook will actually work if the registration process failed. As in, maybe it's a different URL for each registration attempt. I don't believe this to be the case, but I'm not sure.

Also, I'm not sure the the way the error is displayed allows for copy&paste of the URL.

If neither is a problem, great :)

Contributor

oliversalzburg commented Jan 26, 2016

@knownasilya I'm not sure if the hook will actually work if the registration process failed. As in, maybe it's a different URL for each registration attempt. I don't believe this to be the case, but I'm not sure.

Also, I'm not sure the the way the error is displayed allows for copy&paste of the URL.

If neither is a problem, great :)

@knownasilya

This comment has been minimized.

Show comment
Hide comment
@knownasilya

knownasilya Jan 26, 2016

Member

I guess we shall see 👍

Member

knownasilya commented Jan 26, 2016

I guess we shall see 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment