From 7582e107cf70cdc018b8f44000ec9d3c3976ea80 Mon Sep 17 00:00:00 2001 From: MykhailoMaybeworks <118250000+MykhailoMaybeworks@users.noreply.github.com> Date: Fri, 7 Jul 2023 08:53:32 +0300 Subject: [PATCH] feat: add 'catch' case for '_patch' method (#20) --- src/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 57588af..21f718a 100644 --- a/src/index.js +++ b/src/index.js @@ -840,7 +840,8 @@ class Service extends AdapterService { return this._createQuery(params) .allowGraph(allowedUpsert) .upsertGraphAndFetch(dataCopy, upsertGraphOptions) - .then(this._selectFields(params, data)).then(this._commitTransaction(transaction), this._rollbackTransaction(transaction)); + .then(this._selectFields(params, data)).then(this._commitTransaction(transaction), this._rollbackTransaction(transaction)) + .catch(errorHandler); }); }