anchor.diff:              ]}}
           ]}}
       ]}),
  -    ?_assertThrow({compilation_error, _}, couch_db:update_doc(Db, Doc, [])).
  +    ?_assertThrow(
  +        {bad_request, compilation_error, _},
  +        couch_db:update_doc(Db, Doc, [])).
   
   should_reject_invalid_builtin_reduce(Db) ->
       Doc = couch_doc:from_json_obj({[
  
positive.code:             ]}}
          ]}}
      ]}),
      ?_assertThrow({invalid_design_doc, _}, couch_db:update_doc(Db, Doc, [])).
  
negative.code:             ]}}
          ]}}
      ]}),
      ?_assertThrow(
          {bad_request, compilation_error, _},
          couch_db:update_doc(Db, Doc, [])).
  
  should_reject_invalid_js_reduce(Db) ->
      Doc = couch_doc:from_json_obj({[
  