anchor.diff:           validate_request/3]).
   
   %% Helpers for webmachine callbacks
  --export([create_from_json/5,
  +-export([add_notes/2,
  +         create_from_json/5,
            init/2,
  -         log_request/2,
            verify_request_signature/2,
            update_from_json/4]).
   
  
positive.code: %% under the License.
  %%
  
  
  -module(chef_wm_base).
  
  %% Complete webmachine callbacks
  
negative.code: content_types_provided(Req, State) ->
      {[{"application/json", to_json}], Req, State}.
  
  finish_request(Req, #base_state{reqid = ReqId,
                                  organization_name = OrgName,
                                  darklaunch = Darklaunch}=State) ->
      try
          Code = wrq:response_code(Req),
          PerfTuples = stats_hero:snapshot(ReqId, agg),
          Req0 = add_notes([{reqid, ReqId},
                              {perf_stats, PerfTuples}], Req),
          AnnotatedReq = maybe_annotate_org_specific(OrgName, Darklaunch, Req0),
          stats_hero:report_metrics(ReqId, Code),
          stats_hero:stop_worker(ReqId),
          case Code of
              500 ->
                  % Sanitize response body
                  ErrReq = create_500_response(AnnotatedReq, State),
                  {true, ErrReq, State};
              _ ->
                  AnnotatedReq1 = add_api_info_header(AnnotatedReq, State),
                  {true, AnnotatedReq1, State}
          end
      catch
          X:Y ->
  