Improved trapping of DNS errors when unable to contact LDAP server, should help #211
All checks were successful
Create Docker Image / Test Application (x86_64) (push) Successful in 29s
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 1m32s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 4m41s
Create Docker Image / Final Docker Image Manifest (push) Successful in 9s

This commit is contained in:
Deon George 2025-02-21 12:22:45 +11:00
parent 7950cc3404
commit d64478e449
2 changed files with 31 additions and 2 deletions

View File

@ -31,7 +31,7 @@
</tr>
<tr>
<th>Host</th>
<td>{{ ($y=collect(config('ldap.connections.'.$x.'.hosts')))->join(',') }} (IP: <strong>{!! $y->transform(function($item) { return collect(dns_get_record($item))->transform(function($item) { return Arr::get($item,'ip',Arr::get($item,'ipv6')); })->filter()->join('</strong>,<strong>'); })->join(',') !!}</strong>)</td>
<td>{{ ($y=collect(config('ldap.connections.'.$x.'.hosts')))->join(',') }} (IP: <strong>{!! $y->transform(function($item) { return collect(@dns_get_record($item))->transform(function($item) { return Arr::get($item,'ip',Arr::get($item,'ipv6')); })->filter()->join('</strong>,<strong>'); })->join(',') !!}</strong>)</td>
</tr>
<tr>
<th>Port</th>

View File

@ -5,5 +5,34 @@
@endsection
@section('content')
{{ $exception->getMessage() }}
@switch($exception->getMessage())
@case("Can't contact LDAP server")
<table class="table table-sm table-borderless table-condensed">
<tr>
<th>@lang('Error')</th>
</tr>
<tr>
<td colspan="2">{{ $exception->getMessage() }}</td>
</tr>
<tr>
<th>@lang('Possible Causes')</th>
</tr>
<tr>
<td>
<ul>
<li>@lang('Your LDAP server is not connectable')</li>
<li>@lang('Your LDAP server hostname is incorrect')</li>
<li>@lang('Your DNS server cannot resolve that hostname')</li>
<li>@lang('Your Resolver is not pointing to your DNS server')</li>
</ul>
</td>
</tr>
</table>
@break
@default
{{ $exception->getMessage() }}
@endswitch
@endsection