-
Notifications
You must be signed in to change notification settings - Fork 20
Closed
Description
When calling to a method which procedure doesn't have, it turns out into an internal exception.
local.ERROR: Method App\Http\Procedures\TennisProcedure::pinga() does not exist {"exception":"[object] (ReflectionException(code: 0): Method App\Http\Procedures\TennisProcedure::pinga() does not exist at /app/vendor/sajya/server/src/Guide.php:144)
Procedure Class
<?php
declare(strict_types=1);
namespace App\Http\Procedures;
use Illuminate\Http\Request;
use Sajya\Server\Procedure;
class TennisProcedure extends Procedure
{
public static string $name = 'tennis';
public function ping(): string
{
return 'pong';
}
}Call a method not exists
<?php
namespace App\Http\Controllers;
use Illuminate\Support\Facades\Http;
use Sajya\Client\Client;
class TennisController extends Controller
{
public function index(): mixed
{
$request = Http::withoutVerifying()
->baseUrl(route('rpc.endpoint'));
$client = new Client($request);
$response = $client->execute('tennis@pinga');
return $response->result();
}
}Metadata
Metadata
Assignees
Labels
No labels