[Feature] Add error logger for register controller (#654)
This commit is contained in:
commit
8745591f97
|
@ -12,6 +12,7 @@ use Illuminate\Foundation\Auth\RegistersUsers;
|
||||||
use Illuminate\Support\Facades\App;
|
use Illuminate\Support\Facades\App;
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
use Illuminate\Support\Facades\Hash;
|
use Illuminate\Support\Facades\Hash;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
use Illuminate\Support\Facades\Validator;
|
use Illuminate\Support\Facades\Validator;
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
use Illuminate\Validation\ValidationException;
|
use Illuminate\Validation\ValidationException;
|
||||||
|
@ -132,6 +133,7 @@ class RegisterController extends Controller
|
||||||
|
|
||||||
if ($response->failed()) {
|
if ($response->failed()) {
|
||||||
$user->delete();
|
$user->delete();
|
||||||
|
Log::error('Pterodactyl Registration Error: ' . $response->json()['errors'][0]['detail']);
|
||||||
throw ValidationException::withMessages([
|
throw ValidationException::withMessages([
|
||||||
'ptero_registration_error' => [__('Account already exists on Pterodactyl. Please contact the Support!')],
|
'ptero_registration_error' => [__('Account already exists on Pterodactyl. Please contact the Support!')],
|
||||||
]);
|
]);
|
||||||
|
|
Loading…
Reference in a new issue