anchor.diff:      Else ->
           throw({bad_ctype, [Else, " is not a supported content encoding."]})
       end.
  +
  +log_stack_trace(Stack) ->
  +    couch_log:error("~p failed with trace: ~p", [stack_hash(Stack), Stack]).
  +
  +stack_trace_id(Stack) ->
  +    {"X-Cloudant-Stack-Hash", stack_hash(Stack)}.
  +
  +stack_hash(Stack) ->
  +    erlang:crc32(term_to_binary(Stack)).
  
positive.code: send_error(Req, Code, ErrorStr, ReasonStr) ->
      send_error(Req, Code, [], ErrorStr, ReasonStr, []).
  
  send_error(Req, Code, Headers, ErrorStr, ReasonStr, Stack) ->
      send_json(Req, Code, Headers,
          {[{<<"error">>,  ErrorStr},
          {<<"reason">>, ReasonStr} |
          case Stack of [] -> []; _ -> [{stack, Stack}] end
      ]}).
  
  % give the option for list functions to output html or other raw errors
  
negative.code:                 {exit, normal, [{mochiweb_request, send, _} | _]} ->
                      exit(normal); % Client disconnect (R14)
                  _Else ->
                      send_error(HttpReq, {Error, nil, Stack})
              end
      end,
  