mod default error for creating membership

This commit is contained in:
philipp lang 2022-11-10 23:46:41 +01:00
parent b1da07e828
commit 8cf7bd2cf2
1 changed files with 2 additions and 1 deletions

View File

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