Skip to content
This repository has been archived by the owner on Aug 5, 2024. It is now read-only.

Creating an app throws an error #24

Closed
sammachin opened this issue May 11, 2016 · 6 comments
Closed

Creating an app throws an error #24

sammachin opened this issue May 11, 2016 · 6 comments
Labels

Comments

@sammachin
Copy link
Contributor

sammachin commented May 11, 2016

Sams-iMac:~ smachin$ nexmo app:create "CLI Test App 1" http://home.sammachin.com http://home.sammachin.com
_http_client.js:50
    throw new TypeError('Request path contains unescaped characters.');
    ^

TypeError: Request path contains unescaped characters.
    at new ClientRequest (_http_client.js:50:11)
    at Object.exports.request (http.js:31:10)
    at Object.socket.once.exports.request (https.js:182:15)
    at sendRequest (/usr/local/lib/node_modules/nexmo-cli/node_modules/easynexmo/lib/nexmo.js:228:27)
    at Object.exports.createApplication (/usr/local/lib/node_modules/nexmo-cli/node_modules/easynexmo/lib/nexmo.js:407:7)
    at Request.applicationCreate (/usr/local/lib/node_modules/nexmo-cli/distribution/request.js:135:30)
    at Command.listener (/usr/local/lib/node_modules/nexmo-cli/node_modules/commander/index.js:301:8)
    at emitTwo (events.js:87:13)
    at Command.emit (events.js:172:7)
    at Command.parseArgs (/usr/local/lib/node_modules/nexmo-cli/node_modules/commander/index.js:615:12)

node v4.4.4
nexmo-cli v0.0.1

@sammachin sammachin changed the title Creating an app throws an erroor Creating an app throws an error May 11, 2016
@cbetta
Copy link
Contributor

cbetta commented May 11, 2016

Hmm. Try wrapping the URLs in quotes?

I'd need to look when I come back. Http://example.com definitely worked for
me.

@cbetta
Copy link
Contributor

cbetta commented May 11, 2016

What shell are you using? Bash?

(Confirmed, issue in ZSH as well)

@sammachin
Copy link
Contributor Author

its the spaces in the app name
nexmo app:create "CLITestApp2" http://home.sammachin.com http://home.sammachin.com
works :)

Not sure if we support spaces in apps or not, will confirm then we should either fix or trap and show a nicer error

@sammachin
Copy link
Contributor Author

Just confirmed that spaces are allowed in app names, and creating an app with spaces via the API and python works.

Just need to urlencode the string before posting

@cbetta
Copy link
Contributor

cbetta commented May 11, 2016

Seems to be an issue in the Node Library. Let me look into it.

@cbetta cbetta added the bug label May 11, 2016
@cbetta
Copy link
Contributor

cbetta commented May 11, 2016

Fixed and released v0.0.7

@cbetta cbetta closed this as completed May 11, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants