From 8cf7bd2cf29086539e6b6dd20fced9ca857a80e7 Mon Sep 17 00:00:00 2001 From: philipp lang Date: Thu, 10 Nov 2022 23:46:41 +0100 Subject: [PATCH] mod default error for creating membership --- src/Api.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Api.php b/src/Api.php index 5394220..1ca9828 100644 --- a/src/Api.php +++ b/src/Api.php @@ -147,7 +147,8 @@ class Api $response = $this->http()->post($url, $data->toNami()); } if (true !== data_get($response->json(), 'success')) { - $this->exception(data_get($response->json(), 'message', 'Update failed'), $url, $response->json(), $data->toArray()); + $defaultError = 'Erstellen der Mitgliedschaft fehlgeschlagen'; + $this->exception(data_get($response->json(), 'message', $defaultError) ?: $defaultError, $url, $response->json(), $data->toArray()); } if (data_get($data, 'id')) {