diff --git a/src/clj/auto_ap/graphql/checks.clj b/src/clj/auto_ap/graphql/checks.clj index a77df35a..5dca3903 100644 --- a/src/clj/auto_ap/graphql/checks.clj +++ b/src/clj/auto_ap/graphql/checks.clj @@ -412,9 +412,13 @@ (let [result (audit-transact (map #(if (map? %) (dissoc % :payment/pdf-data) %) checks) id)] - - (doseq [[_ i] (:tempids result)] - (solr/touch-with-ledger i))) + + (try + (doseq [[_ i] (:tempids result)] + (solr/touch-with-ledger i)) + (catch Exception e + (alog/error ::cant-save-solr + :error e)))) {:invoices (d-invoices/get-multi (map :invoice-id invoice-payments)) :pdf-url (if (= type :payment-type/check) (mu/trace ::merge-pdfs diff --git a/src/clj/auto_ap/jobs/import_uploaded_invoices.clj b/src/clj/auto_ap/jobs/import_uploaded_invoices.clj index 6fbb8f8d..180e484c 100644 --- a/src/clj/auto_ap/jobs/import_uploaded_invoices.clj +++ b/src/clj/auto_ap/jobs/import_uploaded_invoices.clj @@ -69,7 +69,7 @@ s3-location) :import-status :import-status/imported)))] (alog/info ::found-imports :imports imports) - (invoices/import-uploaded-invoice {:user/role "admin"} imports)))) + (invoices/import-uploaded-invoice {:user/role "admin" :user/name "Email Invoice Importer"} imports)))) (catch Exception e (alog/warn ::cant-import :error e) (send-email-about-failed-message (-> r :s3 :bucket :name) (-> r :s3 :object :key) (str e))) diff --git a/src/clj/auto_ap/ssr/invoices.clj b/src/clj/auto_ap/ssr/invoices.clj index 3b775fe0..18722c57 100644 --- a/src/clj/auto_ap/ssr/invoices.clj +++ b/src/clj/auto_ap/ssr/invoices.clj @@ -1086,8 +1086,12 @@ :payment/date (coerce/to-date (:handwritten-date snapshot)))] (invoice-payments invoices invoice-payment-lookup)) (:identity request))] - (doseq [[_ i] (:tempids result)] - (solr/touch-with-ledger i))))) + (try + (doseq [[_ i] (:tempids result)] + (solr/touch-with-ledger i)) + (catch Exception e + (alog/error ::cant-save-solr + :error e)))))) ;; TODO support crediting from balance (defrecord PayWizard [form-params current-step invoice-by-id]