mirror of
https://gitlab.linphone.org/BC/public/flexisip-account-manager.git
synced 2026-01-17 10:08:05 +00:00
Implement XMLRPC like retrocompatibility endpoints Validate phone-info endpoint phone format Improve OVHSMS error handling and log errors Complete tests Fix #34 return a generic message for 404 errors Fix #38 simplify the domain resolving parameter and remove the domain parameter in the token based account creation endpoint
33 lines
773 B
PHP
33 lines
773 B
PHP
<?php
|
|
|
|
namespace App\Exceptions;
|
|
|
|
use Throwable;
|
|
use Illuminate\Database\Eloquent\ModelNotFoundException;
|
|
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
|
|
|
class Handler extends ExceptionHandler
|
|
{
|
|
protected $dontReport = [
|
|
//
|
|
];
|
|
|
|
protected $dontFlash = [
|
|
'password',
|
|
'password_confirmation',
|
|
];
|
|
|
|
public function report(Throwable $exception)
|
|
{
|
|
parent::report($exception);
|
|
}
|
|
|
|
public function render($request, Throwable $exception)
|
|
{
|
|
if ($exception instanceof ModelNotFoundException && $request->wantsJson()) {
|
|
return response()->json(['message' => 'Missing elements to perform the request'], 404);
|
|
}
|
|
|
|
return parent::render($request, $exception);
|
|
}
|
|
}
|