CouchDB
  1. CouchDB
  2. COUCHDB-1318

500 function_clause error when requesting bad views

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.1
    • Fix Version/s: None
    • Component/s: Database Core
    • Labels:
      None
    • Environment:

      OS X, Linux

    • Skill Level:
      Regular Contributors Level (Easy to Medium)

      Description

      Run the replicator test suite. The design document /test_suite_rep_doc_db_a/_design/foobar is well-named. Its views definition is not a

      {"map":..., "reduce":...}

      object but rather a string (of what would be a map function).

      Design documents of this form return HTTP 500 with function_clause errors when querying both (1) _view/the_bad_view and also (2) _info.

      Stack trace:

      [debug] [<0.20047.0>] 'GET' /asdf/_design/x/_view/jason

      {1,1}

      from "127.0.0.1"
      Headers: [

      {'Accept',"*/*"}

      ,

      {'Host',"localhost:5984"}

      ,

      {'User-Agent',"curl/7.19.7 (x86_64-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8k zlib/1.2.3.3 libidn/1.15"}

      ]
      [debug] [<0.20047.0>] OAuth Params: []
      [error] [<0.20047.0>] function_clause error in HTTP request
      [info] [<0.20047.0>] Stacktrace: [{couch_view_group,
      'design_doc_to_view_group/1-fun-0',
      [{<<"jason">>,
      <<"function(doc)

      { emit(doc._id, 1) }

      ">>},
      {dict,0,16,16,8,80,48,

      {[],[],[],[],[],[],[],[],[],[],[],[],[], [],[],[]}

      ,
      {{[],[],[],[],[],[],[],[],[],[],[],[],[],
      [],[],[]}}}]},

      {lists,foldl,3}

      ,

      {couch_view_group,design_doc_to_view_group, 1}

      ,

      {couch_view_group,open_db_group,2}

      ,

      {couch_view,get_group_server,2}

      ,

      {couch_view,get_group,3}

      ,

      {couch_view,get_map_view,4}

      ,

      {couch_httpd_view,design_doc_view,5}

      ]
      [info] [<0.20047.0>] 127.0.0.1 - - 'GET' /asdf/_design/x/_view/jason 500
      [debug] [<0.20047.0>] httpd 500 error response:

      {"error":"unknown_error","reason":"function_clause"}

        Activity

          People

          • Assignee:
            Unassigned
            Reporter:
            Jason Smith
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development