   [headers body-input]
   (if (= mt/json (mt/content-type-mime-type headers))
     (json/decode (slurp body-input) true)
-    (errors/throw-service-error
+    (srvc-errors/throw-service-error
       :invalid-content-type "Creating or updating a provider requires a JSON content type.")))
 
 (def provider-api-routes

(ns cmr.ingest.api.provider
  "Defines the HTTP URL routes for the provider endpoint in the ingest application."
  (:require [compojure.core :refer :all]
            [cmr.common.mime-types :as mt]
            [cmr.acl.core :as acl]
            [cheshire.core :as json]
            [cmr.ingest.services.provider-service :as ps]
            [cmr.common.services.errors :as errors]))

(defn- result->response-map
  "Returns the response map of the given result"

    ;; create a new provider
    (POST "/" {:keys [request-context body params headers]}
      (acl/verify-ingest-management-permission request-context :update)
      (if (common-enabled/app-enabled? request-context)
        (result->response-map
          (ps/create-provider request-context (read-body headers body)))
        (srvc-errors/throw-service-error :service-unavailable 
                                       (common-enabled/service-disabled-message "ingest"))))

    ;; update an existing provider
    (PUT "/:provider-id" {{:keys [provider-id] :as params} :params
