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')) {