Uploaded image for project: 'CouchDB'
  1. CouchDB
  2. COUCHDB-191

Bad javascript syntax in Futon's custom query editor doesn't show an error when run.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Invalid
    • Affects Version/s: 0.9
    • Fix Version/s: None
    • Component/s: Futon
    • Labels:
      None
    • Environment:

      OS: EEEubuntu (based on Ubuntu 8.10). Hardware: EEE PC 904hd. Browser: Firefox 3.0.5.

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

      Description

      In the custom view editor, Futon doesn't report an error when there is bad syntax in the javascript.

      To reproduce:
      1. Browse to http://localhost:5984/_utils/
      2. Open a database
      3. Change the view to "Custom Query..."
      4. In the view code section:
      change: emit(null, doc);
      to: emit(null, doc
      5. Click "Run"

      Actual results:
      The page returns with an empty table below the query editor.

      Expected results:
      The page should return showing a message like "Error in view. Missing ')' after doc, line 3"

      Notes:
      The http response was 200 OK, where it should've been a 400 - Bad Request.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                lukevenediger Luke Venediger
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 48h
                  48h
                  Remaining:
                  Remaining Estimate - 48h
                  48h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified