   (try
     (api/registry-acr-info payload)
     (api/update-acr-registry id payload)
+    (resp-ok)
+    (catch Exception e
+      (resp-error 400 (get-in (ex-data e) [:body :error])))))
+
+(defmethod registry-update :gitlab
+  [_ payload id]
+  (try
+    (api/registry-gitlab-info payload)
+    (api/update-gitlab-registry id payload)
     (resp-ok)
     (catch Exception e
       (resp-error 400 (get-in (ex-data e) [:body :error])))))

               :v2 (api/registry-v2 id)
               :dockerhub (api/dockerhub id)
               :ecr (api/registry-ecr id)
               :acr (api/registry-acr id))
             (resp-ok))
        (resp-error 400 (str "Unknown registry type [" registry "]"))))))


    (catch Exception e
      (resp-error 400 (get-in (ex-data e) [:body :error])))))

(defmethod registry-create :gitlab
  [_ payload]
  (try
    (api/registry-gitlab-info payload)
    (let [response (api/create-gitlab-registry payload)]
      (if (some? response)
        (resp-created (select-keys response [:id]))
        (resp-error 400 "Gitlab registry account already linked")))
    (catch Exception e
      (resp-error 400 (get-in (ex-data e) [:body :error])))))

(defmethod dispatch :registry-create [_]
  (fn [{:keys [params identity route-params]}]
    (let [owner (get-in identity [:usr :username])
