Port search API search more than one fields (#14646)

* Fix port search columns

* Port search API search more than one fields
Fixup port APIs
Change validate_column_list api helper to throw a renderable exception on error and return the valid columns
DeviceCache::get() can handle a bigger range of input

* whitespace

* Refactor exceptions a bit

* change throws type to be more generic

* Lint fixes
This commit is contained in:
Tony Murray
2022-11-18 16:27:56 -06:00
committed by GitHub
parent e851c9abd4
commit 752bbc1531
8 changed files with 177 additions and 103 deletions

View File

@@ -28,7 +28,7 @@ namespace App\Http\Controllers\Ajax;
use App\ApiClients\RipeApi;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use LibreNMS\Exceptions\ApiException;
use LibreNMS\Exceptions\ApiClientException;
class RipeNccApiController extends Controller
{
@@ -50,7 +50,7 @@ class RipeNccApiController extends Controller
'message' => 'Queried',
'output' => $output,
]);
} catch (ApiException $e) {
} catch (ApiClientException $e) {
$response = $e->getOutput();
$message = $e->getMessage();