Leantime/leantime · error · Error
This endpoint only supports PATCH requests
Error message
This endpoint only supports PATCH requests
What it means
Error "This endpoint only supports PATCH requests" thrown in Leantime/leantime.
Source
Thrown at app/Domain/Timesheets/Hxcontrollers/Stopwatch.php:43
/**
* show stop watch
*/
#[RequiresPermission(TimesheetsPermissions::VIEW, global: true)]
public function getStatus(): void
{
$onTheClock = session()->exists('userdata') ? $this->timesheetService->isClocked(session('userdata.id')) : false;
$this->tpl->assign('onTheClock', $onTheClock);
}
/**
* show stop watch
*/
#[RequiresPermission(TimesheetsPermissions::CREATE, global: true)]
public function stopTimer(): void
{
if ($this->incomingRequest->getMethod() !== 'PATCH') {
throw new Error('This endpoint only supports PATCH requests');
}
$params = $this->incomingRequest->request->all();
if (isset($params['action']) && $params['action'] === 'stop') {
$ticketId = (int) filter_var($params['ticketId'], FILTER_SANITIZE_NUMBER_INT);
$hoursBooked = $this->timesheetService->punchOut($ticketId);
}
$this->tpl->setHTMXEvent('timerUpdate');
$onTheClock = session()->exists('userdata') ? $this->timesheetService->isClocked(session('userdata.id')) : false;
$this->tpl->assign('onTheClock', $onTheClock);
}
#[RequiresPermission(TimesheetsPermissions::CREATE, global: true)]
public function startTimer(): void
{View on GitHub (pinned to 9a9f49f100)
When it happens
Trigger: Thrown at app/Domain/Timesheets/Hxcontrollers/Stopwatch.php:43 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Leantime/leantime@9a9f49f100 (2026-08-21).
Data as JSON: /api/errors/f507f938101d1e5c.
Report an issue: GitHub.