couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gennady (JIRA)" <j...@apache.org>
Subject [jira] [Created] (COUCHDB-1683) Malformed source or target url gives a hideous stacktrace instead of a readable error on replication.
Date Wed, 27 Feb 2013 10:17:12 GMT
Gennady created COUCHDB-1683:
--------------------------------

             Summary: Malformed source or target url gives a hideous stacktrace instead of
a readable error on replication.
                 Key: COUCHDB-1683
                 URL: https://issues.apache.org/jira/browse/COUCHDB-1683
             Project: CouchDB
          Issue Type: Improvement
          Components: Replication
            Reporter: Gennady


When trying to replicate from remote database to my local database I get the following error:

```
[Wed, 27 Feb 2013 06:35:53 GMT] [error] [<0.31518.0>] Badarg error in HTTP request
[Wed, 27 Feb 2013 06:35:53 GMT] [info] [<0.31518.0>] Stacktrace: [{erlang,list_to_integer,
                                   ["10.10.0.128:5984"],
                                   []},
                                  {ibrowse_lib,parse_url,4,
                                   [{file,
                                     "/Users/jan/Work/build-couchdb-mac/build-couchdb/git-build/https%3A%2F%2Fgit-wip-us.apache.org%2Frepos%2Fasf%2Fcouchdb.git%3Atags%2F1.2.1/src/ibrowse/ibrowse_lib.erl"},
                                    {line,315}]},
                                  {ibrowse_lib,parse_url,1,
                                   [{file,
                                     "/Users/jan/Work/build-couchdb-mac/build-couchdb/git-build/https%3A%2F%2Fgit-wip-us.apache.org%2Frepos%2Fasf%2Fcouchdb.git%3Atags%2F1.2.1/src/ibrowse/ibrowse_lib.erl"},
                                    {line,183}]},
                                  {couch_replicator_utils,ssl_params,1,
                                   [{file,
                                     "/Users/jan/Work/build-couchdb-mac/build-couchdb/git-build/https%3A%2F%2Fgit-wip-us.apache.org%2Frepos%2Fasf%2Fcouchdb.git%3Atags%2F1.2.1/src/couchdb/couch_replicator_utils.erl"},
                                    {line,301}]},
                                  {couch_replicator_utils,parse_rep_db,3,
                                   [{file,
                                     "/Users/jan/Work/build-couchdb-mac/build-couchdb/git-build/https%3A%2F%2Fgit-wip-us.apache.org%2Frepos%2Fasf%2Fcouchdb.git%3Atags%2F1.2.1/src/couchdb/couch_replicator_utils.erl"},
                                    {line,194}]},
                                  {couch_replicator_utils,parse_rep_doc,2,
                                   [{file,
                                     "/Users/jan/Work/build-couchdb-mac/build-couchdb/git-build/https%3A%2F%2Fgit-wip-us.apache.org%2Frepos%2Fasf%2Fcouchdb.git%3Atags%2F1.2.1/src/couchdb/couch_replicator_utils.erl"},
                                    {line,40}]},
                                  {couch_httpd_replicator,handle_req,1,
                                   [{file,
                                     "/Users/jan/Work/build-couchdb-mac/build-couchdb/git-build/https%3A%2F%2Fgit-wip-us.apache.org%2Frepos%2Fasf%2Fcouchdb.git%3Atags%2F1.2.1/src/couchdb/couch_httpd_replicator.erl"},
                                    {line,34}]},
                                  {couch_httpd,handle_request_int,5,
                                   [{file,
                                     "/Users/jan/Work/build-couchdb-mac/build-couchdb/git-build/https%3A%2F%2Fgit-wip-us.apache.org%2Frepos%2Fasf%2Fcouchdb.git%3Atags%2F1.2.1/src/couchdb/couch_httpd.erl"},
                                    {line,317}]}]
[Wed, 27 Feb 2013 06:35:53 GMT] [error] [<0.31518.0>] Uncaught server error: badarg
[Wed, 27 Feb 2013 06:35:53 GMT] [info] [<0.31518.0>] 127.0.0.1 - - POST /_replicate
500
```

Should expect {"error":"source url is malformed"}

```
curl command: curl -X POST http://localhost:5984/_replicate -d '{"source":"http://usr@pswd:remote_server:5984/remote_db","target":"http://usr:pswd@127.0.0.1:5984/my_db"}'
-H "Content-Type: application/json"
```


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message