From c1e81b53f06a5a1fc285ed9b47ed2327ff25c5ba Mon Sep 17 00:00:00 2001 From: philipp lang Date: Thu, 10 Nov 2022 23:29:04 +0100 Subject: [PATCH] throw actual nami exception message when creating membership --- src/Api.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Api.php b/src/Api.php index 4a0f70c..5394220 100644 --- a/src/Api.php +++ b/src/Api.php @@ -147,7 +147,7 @@ class Api $response = $this->http()->post($url, $data->toNami()); } if (true !== data_get($response->json(), 'success')) { - $this->exception('Update failed', $url, $response->json(), $data->toArray()); + $this->exception(data_get($response->json(), 'message', 'Update failed'), $url, $response->json(), $data->toArray()); } if (data_get($data, 'id')) {