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

Escapes the URL before adding document #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

antitoine
Copy link

@antitoine antitoine commented Mar 20, 2019

Allow using Unicode character in the document ID (in CouchDB). Without this escape function, the following error occurs:

{"name":"couch2elastic4sync","hostname":"zbra","pid":21052,"level":30,"msg":"putting to http://localhost:9200/test/idx/\u0000idea\u0000588e5501d4c2af7879798180ada017460c757b91f44751bcc10d164201a16346\u0000","time":"2019-03-20T15:26:37.650Z","v":0}
_http_client.js:137
      throw new TypeError('Request path contains unescaped characters');
      ^

TypeError: Request path contains unescaped characters
    at new ClientRequest (_http_client.js:137:13)
    at Object.request (http.js:39:10)
    at Req._send (/home/ancha/.nvm/versions/node/v8.15.1/lib/node_modules/couch2elastic4sync/node_modules/jsonist/node_modules/hyperquest/index.js:136:21)
    at /home/ancha/.nvm/versions/node/v8.15.1/lib/node_modules/couch2elastic4sync/node_modules/jsonist/node_modules/hyperquest/index.js:50:21
    at _combinedTickCallback (internal/process/next_tick.js:132:7)
    at process._tickCallback (internal/process/next_tick.js:181:9)

Signed-off-by: Antoine Chabert <antoine.chabert@tohero.fr>
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

Successfully merging this pull request may close these issues.

None yet

1 participant